Skip to content
Discussion options

You must be logged in to vote

It's not possible to share data between loaders, this is because:

  1. On a document request (SSR), they run all at the same time in parallel, so you couldn't share data between two or more loaders.
  2. On a client-side navigation, they are requested in parallel too.
  3. On a client-side navigation, if you deployed to serverless they may even run on different machines
  4. On a client-side navigation, Remix may not call all the loader, if you are on /parent/child1 and navigate to /parent/child2 because /parent didn't changed Remix will only call the loader of child2.

Because of all of this, specially the last one, each loader should run all the logic it needs, if a loader needs the access token and refre…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@lunsdorf
Comment options

@sergiodxa
Comment options

Answer selected by lunsdorf
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