Skip to content
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

Isomorphic loader breaks when context changes #143

Open
dcramer opened this issue Mar 10, 2024 · 2 comments
Open

Isomorphic loader breaks when context changes #143

dcramer opened this issue Mar 10, 2024 · 2 comments

Comments

@dcramer
Copy link
Owner

dcramer commented Mar 10, 2024

Because the root loader, like all loaders, are executed in parallel, we have once again hit an issue.

  1. Login happens
  2. Server redirects, new server passes the LoadContext into root loader (aka the new user object)
  3. In parallel, we've redirected to /settings
  4. /settings hits window.REMIX_CONTEXT, which is bound in root.tsx, it hasnt bound user yet
  5. /settings then redirects back to /login

No idea how we're going to fix this (sigh) without a hard refresh on login.

@dcramer
Copy link
Owner Author

dcramer commented Mar 19, 2024

Duct taped in e3d1b73

@dcramer
Copy link
Owner Author

dcramer commented Mar 19, 2024

Core behavior is solved by using redirectDocument, though it doesnt fix the underlying issue. This could still get hit if the frontend was active and the session expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant