navigation-rfc
navigation-rfc copied to clipboard
Create an API similar to ExNavigator
I'm looking to use this + Redux to replace ExNavigator. I imagine dispatching push actions as in https://github.com/jlyman/RN-NavigationExperimental-Redux-Example and reducers generate the navigationState prop.
What I don't imagine is the renderOverlay and renderScene props NavigationAnimatedView. Those would be handled automatically similar to how ExNavigator handles them. Well, hopefully identically, so React Native developers can easily migrate from the very popular ExNavigator package to--let's call it--NextNavigator, which would wrap Navigator Experimental.
So my question is: what is needed to get this done? I imagine the navigation bar being the hardest part. Can it already do all that the ExNavigator bar can do, in terms of the highly customized navbar transitions, and in terms of placement of the different buttons. Is it just sitting their waiting to receive the same props for the title, rightButton and backButton? I'm asking because there seems to be a lot more complexity that is required when it comes to rendering the scene and overlay than what you get coming from ExNavigator. I'm wondering what that is all about. For me, it's been somewhat of a roadblock keeping me from diving in more.
The API surface seems unnecessarily large compared to what it could be. I don't see why it can't be the declarative version of ExNavigator where you basically just dispatch route objects, story over. I'm willing to help make this happen, but I'd just like to know what the constraints and limitations holding this back are. It seems if this was easy, it would have been done already--it would have been the target goal. Perhaps it's just a case of first getting the underlying machinery working with a low level enough API so that others have at their disposal enough tools to do build the most possibilities with. Or perhaps there is something I'm missing that would make this harder than I think--that's my real question here. Either way, now seems like a good time to make the declarative version of ExNavigator, aka "NextNavigator".
The API surface seems unnecessarily large compared to what it could be. I don't see why it can't be the declarative version of ExNavigator where you basically just dispatch route objects, story over. I'm willing to help make this happen, but I'd just like to know what the constraints and limitations holding this back are.
Mostly because it has to address a fairly large number of use cases and needs to be customisable enough. But we try to have sane defaults to get started without much customizations. If you've some ideas, please do send some PRs.
BTW @skevy is working on a new version of ExNavigator which is probably what you want.
I've been making some exciting progress on this front, react-router-native. Feedback and pull requests are greatly appreciated.
🍺