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

Better documentation for router getScreenOptions

Open
#319 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The documentation of getScreenOptions needs some clarification:

  • the headline is getScreenOptions(navigation, screenProps) but the text explains 3 parameters. What is about navigationOptions?
  • The text says "retrieve the navigation options for a screen". Why the function is named screen options while it returns navigation options?
  • The example code uses addNavigationHelpers which does not exits anymore?
  • For me is not clear where I can use this function, p.ex. in screen, in my custom router, etc. Please improve the example to make this more clear.

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 linked custom-routers documentation at the getScreenOptions section and review its signature, explanation, and example using addNavigationHelpers. Clarify the parameters, terminology, current API usage, and where the function is used; done means the example and surrounding text answer each point without relying on outdated APIs.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.