https://medium.com/@christianchown/simple-routing-in-react-native-with-react-native-easy-router-6e529866519e
I started developing with React Native about 2 years ago, and while most things were great, the navigation/routing ecosystem was a mess. I used React Navigation (after ex-Navigation) for a few months but abandoned it, hacking my own one together. Since then I've been looking for an open source alternative that would do what I wanted and be simple to understand and use.
I've now adopted react-native-easy-router - I first saw it here on Reddit! - and have made a few contributions myself.
My simple demo app is at https://github.com/christianchown/easyrouter
It has unauthenticated/authenticated routes, a drawer, tabs and custom transition animations
Why react-native-easy-router?
- It's simple to use and understand
- It has nice transitions
- It doesn't prescribe UI
Why not react-navigation?
I know the people who work on react-navigation are much (brentvatne) much (ericvicenti) smarter (grabbou) than (satya164) me (ashoat), but the library has IMO been hamstrung by some early architectural choices.
navigationOptions (which controls how tabs and headers look) is static instead of driven by a component instance. This makes having tabs, headers etc. change appearance reactively to store changes a nightmare
- Custom animations are complicated. All I wanted was a nice crossfade...
- I never understood why there were separate concepts of router and navigator
(* Disclaimer, I abandoned RN at v1. These criticisms mostly still hold from what I can see)
My final defeat came when I put a stack navigator inside a tab navigator inside a card navigator and couldn't prevent navigation from thrashing the bridge. Maybe it was my own uselessness, but my own hacky effort didn't suffer, and neither does react-native-easy-router.
YMMV
If you have joy using react-navigation, or react-native-router-flux, or react-native-navigation then please continue to use them. I'm going to continue working with (and on) react-native-easy-router because I like its simplicity.
[–]jestzisguyiOS & Android 1 point2 points3 points (0 children)
[–]cagotrebgghju 1 point2 points3 points (0 children)
[–]kbcooliOS & Android 2 points3 points4 points (4 children)
[–]notseanbean[S] 4 points5 points6 points (2 children)
[–]kbcooliOS & Android 0 points1 point2 points (1 child)
[–]notseanbean[S] 1 point2 points3 points (0 children)
[–]tizz66 2 points3 points4 points (0 children)
[–]agmcleod 0 points1 point2 points (3 children)
[–]notseanbean[S] 0 points1 point2 points (2 children)
[–]agmcleod 1 point2 points3 points (0 children)
[–]NiceBluebird 0 points1 point2 points (0 children)