question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for React Navigation 2.x

See original GitHub issue

Great library. Is there a plan to support React Navigation 2.x https://next.reactnavigation.org/docs/en/stack-navigator.html

Few API will change StackNavigator becomes createStackNavigator.

Is there a way to help?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
chrfalchcommented, Apr 19, 2018

@joegoodall1 I haven’t had the time to start looking at the new versions, wanted to get the existing version up to a descent level first 😉

4reactions
ericvicenticommented, Apr 4, 2018

Hey @chrfalch, great work! I actually came here to post about the same topic, react-nav 2 and beyond.

v2

We’ve updated the API for createNavigator in v2, which will make your migration slightly non-trivial, but it should result in simpler code. The new API is documented here:

https://next.reactnavigation.org/docs/en/custom-navigators.html#createnavigator

tldr: the navigation view now gets screen ‘descriptors’, and no longer can directly access the router. addNavigationHelpers is going away.

v3 and beyond

Let’s collaborate on a new transitioner for the library! The one in core is pretty crufty, as I’m sure you’ve realized 😆

I’m drafting a simpler new transitioner here, potentially for v3 of the library: https://github.com/react-navigation/react-navigation/blob/%40ericvicenti/transitioner2/src/views/StackView/Transitioner2.js

But it doesn’t support your shared element magic, so I think this would be great timing to collaborate.

It would be so nice to allow the header and inner elements to be rendered via shared element transition in comparison to the current approach. We’d be able to support much more advanced use cases. Plus, navigation options have proven to be a pretty inconvenient way for people to set up their header in comparison to rendering things inside the screen, where component state can be accessed.

Feel free to message me on twitter, or email <my github handle> at gmail.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Navigation 2.0
Custom navigators can now provide actions helpers for their screens. For example, the new drawer navigator now allows props.navigation.
Read more >
Overview | React Navigation
This is documentation for React Navigation 2.x, which is no longer actively maintained. For up-to-date documentation, see the latest version (6.x).
Read more >
React Navigation on the Web
React Navigation's web support currently requires using React Native for Web. This approach lets us reuse the same code on both React Native...
Read more >
Supported React Native versions
This is documentation for React Navigation 2.x, which is no longer actively maintained. For up-to-date documentation, see the latest version (6.x).
Read more >
Getting started | React Navigation
This is documentation for React Navigation 2.x, which is no longer actively maintained. For up-to-date documentation, see the latest version (6.x).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found