expo / ex-navigator

Route-centric navigation built on top of React Native's Navigator
MIT License
522 stars 68 forks source link

Are there any plans to wrap Navigator Experimental? #112

Closed faceyspacey closed 8 years ago

faceyspacey commented 8 years ago

I'm picturing an ideal scenario where both are targeted towards redux and you can call the equivalent of navigator.push and Redux actions that control the state of the navigator are dispatched. That way you can properly use Redux dev tools to move back and forth through your state transitions. It would also make it easier to migrate. You could basically just replaceAll your navigator.push calls to be this.props.someReduxAction and then connect your components to redux instead.

The real win though is you could easily setup the stack for your components from redux. For example, in combination with redux-storage I'm currently using imperative hacks with immediatelyResetRouteStack as part of some in-app developer tools I built so that developers can instantly setup a route stack ending in the route they are currently working on. So on reloads, it will take you to where you left off. And generally you can select from the developer menu and instantly go to the given route (and navigator in my case). I'm basically providing a declarative interface, but handling it imperatively internally. What it doesn't do is:

A) handle transitions, which is what users (as opposed to developers) would need. B) allow for backwards in the stack using Redux dev tools (though, I could probably hack this too)

ide commented 8 years ago

Sorry I didn't respond earlier -- to answer your general question, @skevy made and is continuing to work on ExNavigation which is the spiritual successor to ExNavigator but has a different API and is built on top of the NavigationExperimental component. We have a couple more features like deep linking to build before publishing ExNavigation to GitHub but yes we are working on it, and like ExNavigator, its feature set and API are guided by our own product development to address our real-world needs.