mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 17:34:59 +08:00
a021cfb8af4afd50f785f6ee9b51d361e25704ca
The PR changes a few things about linking configuration: - Moves the configuration for screens to a screens property so that it's possible to specify other options like `initialRouteName` for the navigator at root - The nesting in the configuration needs to strictly match the shape of the navigation tree, it can't just rely on URL's shape anymore - If a screen is not specified in the configuration, it won't be parsed to/from the URL (this is essential to handle unmatched screens) - Treat `path: ''` and no specified path in the same way, unless `exact` is specified - Disallow specifying unmatched screen with old format - Add support for `initialRouteName` at top level - Automatically adapt old configuration to new format
React Navigation 5
Routing and navigation for your React Native apps.
Documentation can be found at reactnavigation.org.
If you are looking for version 4, the code can be found in the 4.x branch.
Package Versions
Contributing
Please read through our contribution guide to get started!
Installing from a fork on GitHub
Since we use a monorepo, it's not possible to install a package from the repository URL. If you need to install a forked version from Git, you can use gitpkg.
First install gitpkg:
yarn global add gitpkg
Then follow these steps to publish and install a forked package:
- Fork this repo to your account and clone the forked repo to your local machine
- Open a Terminal and
cdto the location of the cloned repo - Run
yarnto install any dependencies - If you want to make any changes, make them and commit
- Now
cdto the package directory that you want to use (e.g.cd packages/stackfor@react-navigation/stack) - Run
gitpkg publishto publish the package to your repo
After publishing, you should see something like this:
Package uploaded to git@github.com:<user>/<repo>.git with the name <name>
You can now install the dependency in your project:
yarn add <user>/<repo>.git#<name>
Remember to replace <user>, <repo> and <name> with right values.
Description
Languages
TypeScript
97.9%
Java
0.8%
JavaScript
0.6%
Objective-C
0.4%
Starlark
0.2%