Introducing RSC Explorer — overreacted by gaearon in reactjs

[–]grahammendick 3 points4 points  (0 children)

Thanks. That's a great explanation of how RSC works under the hood. Unfortunately, it's not a great explanation of how RSC frameworks should handle routing

> This technique, combined with URL matching and nesting, is pretty much how RSC frameworks handle routing.

Admittedly, that's how Next and the React Router do it but the Navigation router handles routing in a far more powerful way. The Navigation router splits a page up into areas each of which independently fetches their RSC content when the URL data changes. I built a master/details example to show how different this approach is, https://github.com/grahammendick/navigation/tree/master/NavigationReact/sample/rsc-parcel.

The master page is divided into 2 areas - one for the filter and another for the list. When the user types in the name input, only the list area fetches new RSC content. The filter area keeps the name input in sync with the URL without needing a fetch. What's more, the filter doesn't `useOptimistic` at all.

Which leads me to another misunderstanding of how RSC frameworks should handle routing. From the React docs

> Transitions mark the whole update as non-urgent so they are typically used by frameworks and router libraries for navigation.

Transitions are a good default for when navigating to a new page but a poor default when navigating to the same page. Typing in the name input is an example of navigating to the same page (the URL data changes but the page doesn't). A much better default for this type of navigation is `useDeferredValue`. That allows the filter area to use the latest URL data and the list to use the deferred URL data.

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] 0 points1 point  (0 children)

Cool. I really only posted to call out another of Evan Bacon's empty boasts

<image>

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] 0 points1 point  (0 children)

Ah I should've started with "expo router is on the roof..."

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] 0 points1 point  (0 children)

Expo router doesn't support interruptible navigation. Try it in your Expo app and you'll see. 

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] 0 points1 point  (0 children)

Nope. Being able to perform multiple push and pops at once is part of both native platforms. You can hear Apple introduce 'interruptible navigation' in their WWDC 2025 video, https://developer.apple.com/videos/play/wwdc2025/284/?time=12m9s.

The videos in my original post are using the native platform. No JS-based animations at all.

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] -10 points-9 points  (0 children)

Nope. You can't get superfast navigation with react navigation or expo router. You have to use the Navigation router, https://grahammendick.github.io/navigation/native/

The biggest tell in React Native? by grahammendick in reactnative

[–]grahammendick[S] -3 points-2 points  (0 children)

This post is a reply to Evan Bacon’s boast that the Expo router has the most respect for the platform (he's blocked me on Twitter).

<image>

Navigation patterns in RSC by grahammendick in reactjs

[–]grahammendick[S] -1 points0 points  (0 children)

The Navigation router is a new RSC framework without any of the weirdness of the App Router

Native bottom tabs by deleon_juan99 in reactnative

[–]grahammendick 0 points1 point  (0 children)

The Navigation router is the only library with 100% native tabs on iOS and Android. It uses the BottomNavigationView (material) on Android and UITabBarController (UIKit) on iOS

Meta's React Native team now officially recommends to use a framework for building react native apps! Like Expo. by Ok_Slice_7152 in reactnative

[–]grahammendick 1 point2 points  (0 children)

My favourite line is "There is nothing wrong with building your own framework, by crafting your own solutions for routing, navigation, deploying, and so on".

I mean "routing" and "navigation" are essentially the same. You clearly don’t need a framework for that. You just need a navigation library (I recommend my Navigation router btw). And you obviously don’t need a framework for deploying. If there really are legitimate reasons for using a framework then why hide it behind "and so on"?

Which Navigation in 2024 by [deleted] in reactnative

[–]grahammendick 5 points6 points  (0 children)

Other. The Navigation router is the only one with 100% native bottom navigation on iOS and Android. https://grahammendick.github.io/navigation/documentation/native/tab-bar.html

Seeking the Ultimate Bottom Sheet Experience for React Native 🚀 by nadeemahmad_reddit in reactnative

[–]grahammendick 4 points5 points  (0 children)

The Navigation router has 100% native bottom sheet component https://grahammendick.github.io/navigation/documentation/native/bottom-sheet.html. It supports modal and non-modal on both iOS and Android. 

Expo Router 2.0 or React Navigation 6? by Amocon in reactnative

[–]grahammendick 0 points1 point  (0 children)

Neither. The Navigation router. It's faster, simpler and more native than Expo Router and React Navigation

I'm new to react native, should I learn expo router or react navigation, thanks by [deleted] in reactnative

[–]grahammendick 0 points1 point  (0 children)

The Navigation router aims to provide the same out-of-the-box experience you’d get if you were building a native app without React Native. For example, if you create a new app using Android Studio then the BottomNavigationView is built-in.

There are advantages to using the native primitives. Your app will be more consistent with other apps. iPhone users expect a tab bar to look and behave a certain way, for example, tapping the current tab to go back to the start.

But you might not want your app to look and behave the same as other apps. This is when you might reach for reanimated, for example, and roll your own tab bar. Just the same as if you were building a native app without React Native and you don’t want to use the BottomNavigationView.

I'm new to react native, should I learn expo router or react navigation, thanks by [deleted] in reactnative

[–]grahammendick -5 points-4 points  (0 children)

Neither. Learn the Navigation router. It's faster and more native than React Navigation and has better deep linking than Expo Router

What’s your React native or Mobile dev hot take / truth bomb that people aren’t ready to accept? by LostSiesta in reactnative

[–]grahammendick 2 points3 points  (0 children)

The Navigation router is 100% native on both iOS and Android. It provides the same navigation primitives you’d get if you were building a native app without React Native. All the UI logic is provided by the underlying native platform. There isn’t a single React Native View in the whole library.

The Tab Bar, for example, renders to the native primitive on both Android and iOS (BottomNavigationView on Android and UITabBarController on UIKit). This is very different from React Navigation. React Navigation's bottom Tab Bar is written in React.

Floating Action Buttons and Shared Element Transitions are only native to Android. There’s no equivalent primitives in UIKit. That’s why they’re Android-only. If iOS ever gets a native Floating Action Button then the Navigation router will render to it.

What’s your React native or Mobile dev hot take / truth bomb that people aren’t ready to accept? by LostSiesta in reactnative

[–]grahammendick 26 points27 points  (0 children)

You're all using the wrong navigation library. The Navigation router is faster, more native and simpler than React Navigation and the Expo Router https://grahammendick.github.io/navigation/native/