Replies: 1 comment
-
On the document request, when the server sends the HTML, first it runs the loaders, then it renders the app server-side to HTML and send a response, once your JS loads the app is hydrated. If you added If you don't add that, it will never run in this case. When the user does a client-side navigation (it clicks a link or submits form) the router will check what routes has clientLoaders. Then it will do a single HTTP request for every route that doesn't have a clientLoader, and it will call every clientLoader. Inside the clientLoader, is your responsibility to call the If you added Once all loader and clientLoader resolved, then the router does the actual navigation and show the new UI. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out the order of operations with loader and client loader as it relates to page navigation
Does client loader fire after initial page load after the server side fetch?
Does it fire before page navigation when the app has been loaded up already and block navigation until it's finished?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions