Files
react-navigation/example
Satyajit Sahoo 4fe72e3ce7 feat: add wildcard patterns for paths
Currently, if we don't have matching routes for a path, we'll reuse the path name for the route name. This doesn't produce an error, and renders the initial route in the navigator. However, the user doesn't have a way of handling this with the default configuration.

This PR adds support for a wildcard pattern ('*'). The wildcard pattern will be matched after all other patterns were matched and will always match unmatched screens. This allows the user to implement a 404 screen.

Example:

```js
{
  Home: '',
  Profile: 'user/:id',
  404: '*',
}
```

This config will return the `404` route for paths which didn't match `Home` or `Profile`, e.g. - `/test`

Closes #8019

Co-authored-by: Evan Bacon <baconbrix@gmail.com>
2020-06-05 17:13:00 +02:00
..
2020-02-14 18:32:53 +01:00
2020-01-30 05:03:31 +01:00
2020-05-26 16:07:47 +02:00
2020-05-27 19:55:37 +02:00
2020-06-05 17:13:00 +02:00
2019-12-09 15:20:28 +01:00
2020-05-26 16:07:47 +02:00
2020-03-22 23:58:06 +01:00
2020-05-20 13:27:29 +02:00
2020-01-10 13:12:32 +01:00
2020-05-23 17:33:34 +02:00

Example for React Navigation

If you want to run the example from the repo,

  • Clone the repository and run yarn in the project root
  • Run yarn example start to start the packager
  • Follow the instructions to open it with the Expo app

You can also run the currently published app on Expo on your Android device or iOS simulator or the web app in your browser.