docs: mention index is always last route in a stack
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.
✔️ 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
Thanks for the review, and thanks for pointing me to that section, the new text does fit in better there.
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
resetanyway, 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?