Files
react-navigation/example
Satyajit Sahoo f51f9c8493 feat: add helper to get focused route name from nested state (#8435)
Currently, to access the focused child screen, we need to do something like this:

```js
const routeName = route.state
  ? route.state.routes[route.state.index].name
  : route.params?.screen || 'Feed';
```

However, it doesn't handle some cases, such as when `route.state` is partial. This helper will make it easier:

```js
const routeName = getFocusedRouteNameFromRoute(route) ?? 'Feed';
```
2020-06-15 13:52:38 +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
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
2020-06-12 18:37:40 +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.