Alternative API: easier (low learning-curve) & dynamic (less boilerplate)
complete
Brent Vatne
It would be nice to have an alternative API for react-navigation which doesn't require you to define routes statically, or even think in terms of StackNavigators, if all you want to do is have a simple stack and maybe some modals -- similar to how on the web you don't have to learn much to have a simple navigation history stack, it just ships out of the box.
satya164
complete
https://reactnavigation.org/blog/2020/02/06/react-navigation-5.0.html
satya164
in progress
Darren Cruse
Glad to see this feature request as I've been using react-navigation a bit now and I just finished writing my first custom navigator (a tablet style side bar nav that expands/collapses and automatically switches to using the RN drawer on mobile). The experience of writing this first custom navigator was pretty painful for me. Obviously the next time will be better but it had me also thinking about the learning curve and design of even just using RN navigators.
And to me the elephant-in-the-room design question with RN is why it doesn't feel more like react itself. Where people praise basic react for being something you can pick up easily. Sure redux and all the other goodies add complexity but at least there's basic examples you can start with without all those things.
And big grain of salt comment here since I haven't used actually used it: react-native-router-flux to me looks like what I would hope the hello world react-navigation examples should be like.
Have you guys considered the possibility of merging with that project?
i.e. Making the RNRF approach more the basic intro level way of using RN but maybe keeping the current no-jsx api approach as more for advanced needs?
Note that I would consider using RNRF as it is except they aren't up to date with RN v3 and I'm working on a new greenfield project that won't deploy for year there's no way I will use it if it's not keeping up with the latest RN.
So that would be another advantage of you guys merging with them. That it would also be up to date with RN.
If not RNRF I think something like it (i.e. JSX for navigators). Plus being able to write navigators with e.g. simple component state (or hook functions), instead of feeling like you've left the world of react and having to learn
so
much new stuff (e.g. your redux-like action approach to state handling only made sense to me when writing my custom navigator because of my prior experience with redux but it so happens we've chosen not to use redux on my project and all I had was one tiny little "expanded: true/false" bit of state I would have much rather just used simple component state for my navigator).Are you react-navigation guys open to merging RNRF at all? What would be the drawbacks?
Harshul Sharma
Idea is nice but I think its better to learn the full api since the engineers need to use our library and we don't wish them to be cursing us since they don't know how stuff really works. Won't it be pointing them to wrong direction?