Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for React Navigation 2.x #2

Closed
fabriziogiordano opened this issue Apr 4, 2018 · 6 comments
Closed

Support for React Navigation 2.x #2

fabriziogiordano opened this issue Apr 4, 2018 · 6 comments
Labels

Comments

@fabriziogiordano
Copy link
Contributor

@fabriziogiordano fabriziogiordano commented Apr 4, 2018

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?

@ericvicenti

This comment has been minimized.

Copy link

@ericvicenti ericvicenti commented 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 at gmail.

@chrfalch

This comment has been minimized.

Copy link
Contributor

@chrfalch chrfalch commented Apr 5, 2018

@ericvicenti - I'll message you later :-)

@fabriziogiordano - I don't think it would be too difficult to upgrade the library to V2!

@chrfalch

This comment has been minimized.

Copy link
Contributor

@chrfalch chrfalch commented Apr 12, 2018

@ericvicenti Please email me at christian.falch at gmail.com so that we can discuss directly :-)

@chrfalch chrfalch added the question label Apr 18, 2018
@joegoodall1

This comment has been minimized.

Copy link
Contributor

@joegoodall1 joegoodall1 commented Apr 19, 2018

Hi @chrfalch,

Echoing @fabriziogiordano and @ericvicenti comments, found this to be a really good library which works seamlessly with react-navigation v1.x.

Any update on future support for v2.x and v3.x?

@chrfalch

This comment has been minimized.

Copy link
Contributor

@chrfalch chrfalch commented 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 ;-)

@chrfalch

This comment has been minimized.

Copy link
Contributor

@chrfalch chrfalch commented May 9, 2018

Done!

@chrfalch chrfalch closed this May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.