There were so many reasons to be excited about navigation in the year 2023! This was mainly due to the incredible orchestration of many different teams building libraries across the ecosystem, that worked together in perfect harmony.
Starting with the work of Software Mansion. Major improvements in libraries like react-native-screens
, react-native-reanimated
, and react-native-gesture-handler
delivered better shared element transitions and custom gesture-driven animations for native navigators.
The React Navigation team presented some exciting new improvements they have planned for v7. This includes a new static API for a more streamlined development process.
And finally, Expo Router, the first file-based router for both native and web apps, was released in February and ushered in a new era of universal app development. Powered by React Navigation, Expo Router could automatically generate routes, types, and deep links based on files in the app/
directory. This opened the door for many new possibilities in React Native, including better code sharing with web, improved error reporting, route-based analytics, native bundle splitting, lazy bundling, build-time optimizations, and much more.
The navigation space is innovating faster than ever before and shows no signs of stopping! I predict 2024 will likely bring support for React concurrent mode in routing, better testing solutions, server routing (for at least web), and more native navigation primitives (hopefully UISplitViewController
)!
Evan Bacon
Recently we have been seeing the rise of full-fledged frameworks like Expo Router. The "Router" in the name is unfortunate, since it handles a lot more than routing with new features like API routes, and hopefully more to come such as data fetching and caching. React Native has been missing a framework like Next.js for a long time, and it's great to see Expo filling that gap.
It's also quite interesting to see the decline in the usage of React Native Navigation. And to be honest, it is kinda unfortunate, as more options and competition is always beneficial to the ecosystem.
Though it is declining, I'm also surprised to see such high usage of React Router, as it only handles the routing and a lot of work needs to be done on top of it for native apps.
And while not on the chart, Software Mansion's React Native Screens library is the most important part of navigation in React Native, providing essential optimizations as well as native navigation primitives. So I think it's worth mentioning it.
There is still a lot that can be improved in the navigation space, one of them being ease of use. In addition to frameworks like Expo Router, there have also been a lot of work in React Navigation to simplify the configuration with the addition of Static API. Even though we've been working on this for many years, there is still a lot to be done.
Overall, 2024 looks like it will be an exciting year for navigation in React Native, with more updates to Expo Router, and potential release of React Navigation 7.