-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
🗺️ Split Route Modules (client loaders/actions/HydrateFallback) #11571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is one that that makes remix remix. Why do we want to split them out ? |
@mbsyaswanth the idea is to split the clientLoader and clientAction code from the route code, no to remove them from Remix itself This is the Roadmap Planning video where it was discussed and explained https://www.youtube.com/live/7kdulqXtPII?t=2570&si=v8Xhz62QJFSVF0Rg. |
@mbsyaswanth like @sergiodxa said. It's not going anywhere. Today they run in series. Tomorrow they'll run in parallel. Faster renders. |
Planning Notes
PR: #11871
When a link to a route with a client loader is clicked the browser has to first fetch the JS module for the route before it can call the client loader.
If a client loader is small, and the component is large, this slows down the transition because the loader is blocked by the size of the component.
By splitting out the
clientLoader
to its own bundle we can do these in parallel:Also,
HydrateFallback
is only used for the route that was rendered on initial page load. If we're splitting route modules into chunks, we can also create a separateHydrateFallback
chunk which is only used on the initial page load and then skipped for any client-side navigations.The text was updated successfully, but these errors were encountered: