Fetch-as-render #142
Replies: 4 comments 11 replies
-
Potentially. I'd like to allow for conditionally forcing certain routes to be online-only as this would greatly improve the amount of code an App Clip could support.
No. We're working with the Metro team to implement this so we can split all routes automatically (in development). We have a prototype working but it has some Fast Refresh issues. |
Beta Was this translation helpful? Give feedback.
-
@EvanBacon Hey again. On estimate in which iteration (2.0, 3.0 ...) would you say expo-router would be getting loaders, if ever, to be able to both
|
Beta Was this translation helpful? Give feedback.
-
Hey @EvanBacon. I'm really excited to use the new router. I would like to ask what is the current roadmap on loaders, which I really eagerly wait since last year to make the switch (which will solve a problem react-navigation never solved). To reiterate, I think fetch-as-render, non-urgent transitions and auto Suspense/ErrorBoundary wraps are exactly what React is and its direction at, and hopefully the new and extremely competent expo/router will provide these mechanisms alongside its currently shared goods sooner than later for that reason. Were you able to read the discussion react-navigation/react-navigation#11152? |
Beta Was this translation helpful? Give feedback.
-
@EvanBacon First off, ExpoRouter is amazing. So excited for v2. I'd like to add a comment here that I think much of the React community really doesn't understand the full benefits and motivations all of the hard work Meta has been investing in React in terms of the suspense API. There's really a lot of potential to decrease loading times and give the developer control over the perceived loading time. Really, most of the large changes to React have bene built around Suspense (with the Relay framework they mention above being the flagship use-case). A modern react-focused router should absolutely be suspense compatible. This is this biggest omission of React Navigation is the fact that it doesn't support suspense. The link above is outdated, but here the React docs outline how to build a fully-react suspense enabled router: You'll also see numerous references to router support in the main documentation: Would love to get a "yes", "no", or "maybe" on if this is in the cards or not. |
Beta Was this translation helpful? Give feedback.
-
Will the new router allow eager navigation to facilitate fetch-as-render? Asking for Relay. Also the WIP doc says that
Suspense boundaries: This feature is not currently implemented in React Native/Metro but...
. Didn't RN 0.69 came with full support for Suspense? (equivalent to React 18)Beta Was this translation helpful? Give feedback.
All reactions