Files
react-navigation/packages
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-05-27 18:32:30 +02:00
2020-05-27 18:32:30 +02:00
2020-05-27 18:32:30 +02:00
2020-05-27 18:32:30 +02:00
2020-05-27 18:32:30 +02:00
2020-05-27 18:32:30 +02:00
2020-05-23 18:36:57 +02:00
2020-05-27 18:32:30 +02:00