react-navigation / react-navigation/react-navigation.github.io

Document params passing behavior in navigators

Open
#374 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
324
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/react-navigation/react-navigation/issues/5646

answer i give is:

the route that you navigate to receives the params, not any of its children.

this rfc could help: react-navigation/rfcs#68
more discussion on this here: react-navigation/rfcs#43

we should document this.props.navigation.dangerouslyGetParent().getParam(...) as a way to get the params from the parent, or provide a method that gets params from the parent without the word dangerously maybe...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced issue #5646 and RFCs 68 and 43, then inspect the documentation entry points for navigator route parameters. Document that params go to the navigated route rather than its children, and clarify the parent-param access discussion involving this.props.navigation.dangerouslyGetParent().getParam(...).

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, react-native
Domain
documentation, mobile-dev
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.