Skip to content

When root loader gets called? #11611

Answered by sergiodxa
shanmugharajk asked this question in Q&A
Discussion options

You must be logged in to vote

When the browser sends a document request and the server respond with html, the root loader is called to do the SSR of the app

After an action run, Remix trigger revalidation of all loaders, this can be prevented on a per route basis using the shouldRevalidate export.

When the search params change (the part of the URL after ?), because any route can use them, then all loaders run again, including root.

If you enable the Single Fetch future flag, any client side navigation will run fetch every loader.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shanmugharajk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants