react-navigation.github.io icon indicating copy to clipboard operation
react-navigation.github.io copied to clipboard

docs: mention index is always last route in a stack

Open rctay opened this issue 4 years ago • 3 comments

READ ME PLEASE!

TL;DR: Make sure to add your changes to versioned docs

Thanks for opening a PR!

The docs cover several versions of react-navigation, and in some cases there are several files (for version 1, version 2 and etc.) that all describe a single page of the docs (eg. "Getting Started").

Please make sure that the edit you're making in docs/file-you-edited.md is also included in the file for the correct version, eg. /versioned_docs/version-3.x/file-you-edited.md for version 3. If such file doesn't exist, please create it. :+1:


Hi there, this change make the docs mention this, in case a developer tries to specify a value for index apart that is not equal to the last route in a stack and sees that it has no effect, eg. issue #10056.

rctay avatar Jan 12 '22 10:01 rctay

✔️ Deploy Preview for react-navigation-docs ready!

🔨 Explore the source changes: 7e08e47df0c9501b3546c3858171cd6186762c82

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-navigation-docs/deploys/61deead009e5710007ea9934

😎 Browse the preview: https://deploy-preview-1106--react-navigation-docs.netlify.app

netlify[bot] avatar Jan 12 '22 10:01 netlify[bot]

Thanks for the review, and thanks for pointing me to that section, the new text does fit in better there.

rctay avatar Jan 12 '22 14:01 rctay

Hi @satya164,

Thanks for the PR. I think adding "For example..." to the existing paragraph feels a bit out of place. I'd create a new paragraph for this.

However, the exact structure of navigation state is described in a separate document and it also talks about invalid states & corrections (under "Partial state objects"), so I feel like it'd be better to link there directly instead of adding this here. People need to be familiar with state object to use reset anyway, so that page is a pre-requisite.

https://reactnavigation.org/docs/navigation-state/

I've added the paragraph to navigation state under the Partial state objects section, how does this look to you?

rctay avatar Feb 10 '22 05:02 rctay