React Native Support #207
Replies: 13 comments 16 replies
-
Some weirdness I've encountered so far:
|
Beta Was this translation helpful? Give feedback.
-
A separate point, it's not clear to me how I would integrate react-location into native navigation patterns with eg. https://github.com/software-mansion/react-native-screens Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
In my opinion, It's complicated :-/ in react-navigation, it's "included" in sources with sometimes a fallback I think you can add a screencontainer or a ScreenStack as a "root" component, and use a Screen as direct child (with and inside if necessary |
Beta Was this translation helpful? Give feedback.
-
Tanner did mention this is on the roadmap on Twitter: https://twitter.com/tannerlinsley/status/1590112579468546048 It's definitely not an easy problem space. |
Beta Was this translation helpful? Give feedback.
-
Expo router is other option to see, include router using folder system like next 13 👀, I hope to see tan stack router in react native 🫶🏽🤍 |
Beta Was this translation helpful? Give feedback.
-
An adapter won’t be difficult after we rc |
Beta Was this translation helpful? Give feedback.
-
Since this, expo-router is now in v3. Will we able to use TanStack router with react native (expo) apps? Can we add expo-router to the comparison page? (with possibly related native/web distinction) |
Beta Was this translation helpful? Give feedback.
-
It would take some work to build the inversion of control around the actual GSX elements that are rendered for things like errors, but it would be totally possible to make this work for a react native and expo .
Tanner Linsley
…On Nov 6, 2023 at 2:31 PM -0700, avedetvedea ***@***.***>, wrote:
Since this, expo-router is now in v3. Will we able to use TanStack router with react native (expo) apps? Can we add expo-router to the comparison page?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I definitely think React Native needs this. Expo/react navigation is such a pain to work with. Especially when you deal with stack state, nesting navigators and nested navigation. Plus expo router moved to file based. |
Beta Was this translation helpful? Give feedback.
-
I might be able to give this a good push, but I’m curious if there are any native companies that would sponsor the effort? |
Beta Was this translation helpful? Give feedback.
-
I'd love to see support for Expo, that would be a real cross platform router option which is currently been missing. Expo router can do both, but devs are forced to use Metro for web. |
Beta Was this translation helpful? Give feedback.
-
ngl, as much as I'm excited to use this in React Native, it might actually be worthwhile to push this until I've got TSR working in RN without patching—I had to implement a custom history for RN, and the default error component is required, but it's working bug free AFAIK (though there may be design flaws in my implementation, but I digress). Basically what I'm trying to say is, once |
Beta Was this translation helpful? Give feedback.
-
If the goal is to support crossplatform apps (and not just have another router on RN, of which there are already many), I think the way to go is:
But instead to use Expo Router only on native, and TanStack Router (TSR) only on web, and align them by making a custom file system route loader/adapter for TSR that uses the same file based routing conventions as Expo Router, so that instead of having two separate folder hierarchies (monorepo approach), you could have a single shared/crossplatform app directory (which is just targeted by the platform specific routers, based on aligned conventions). You would have to use Metro to bundle for Native (as Expo Router requires it), but could use Vite to bundle for web. At least until VXRN.dev catches some more momentum. But Expo is betting on expanding their Metro integration, so VxRN might be a risky bet for future alignment with Expo. Expo wants to be the wholesale crossplatform solution with Expo Web and based on Metro, but Expo Web has a big bundle size and doesn’t support SSR (might change with Expo’s vision of RSC for RN, but SSR/SSG etc. feature parity with web frameworks like Next, Vike or TSR + Vinxi is a long way to go). So imho it’s best to take the Solito kind of approach and use each router and bundler setup for the platform they were designed/aimed for. In summary: The idea is to have a single file system hierarchy, which is used by Expo Router on native, and TanStack Router on web. |
Beta Was this translation helpful? Give feedback.
-
Hi 👋
It would be great to start a discussion about react native and if support falls within the goals of this project.
I have a POC here: https://github.com/tom-sherman/ReactLocationNative
Beta Was this translation helpful? Give feedback.
All reactions