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

Incomplete documentation on optional parameters with deep linking and path

Open
#818 8 comments 1 reaction 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

Current Behavior

According to tutorials and documentation I managed to gather online, this piece of code should allow for an optional parameter param2, but it seems that it doesn't work and the path is never matched.

 ex: {
        screen: Screen,
      },
    path: "ex/:param1(/:param2)",
  },```

### Expected Behavior

I hoped here that different paths would be matched like:
- app://ex/p1
- app://ex/p1/p2

Both paths should have been matched according to my understanding of the `path` keyword (almost absent from the documentation, hence the issue).

### Your Environment

| software         | version
| ---------------- | -------
| react-navigation | 4.0.10
| react-native     | 0.61.3
| node             | n/a
| npm or yarn      | n/a

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 deep-linking documentation and the path configuration examples described in the issue. Check how optional parameters are documented for react-navigation 4.0.10 and verify the ex/p1 and ex/p1/p2 paths. Done means the documentation clearly explains the supported syntax and expected matching behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.