Skip to content

Conversation

@rctay
Copy link
Contributor

@rctay rctay commented Jan 12, 2022

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. 👍


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.

@netlify
Copy link

netlify bot commented Jan 12, 2022

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

🔨 Explore the source changes: 7e08e47

🔍 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

Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/

@rctay
Copy link
Contributor Author

rctay commented Jan 12, 2022

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

@rctay rctay force-pushed the rc/index-validity branch from 69e6ade to 12ca776 Compare January 12, 2022 14:49
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.

Signed-off-by: Ray Chuan Tay <[email protected]>
@rctay rctay force-pushed the rc/index-validity branch from 12ca776 to 7e08e47 Compare January 12, 2022 14:50
@rctay rctay requested a review from satya164 January 14, 2022 02:01
@rctay
Copy link
Contributor Author

rctay commented Feb 10, 2022

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?

Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

@satya164 satya164 merged commit 873f292 into react-navigation:main Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants