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

Remove react-router on the server, or upgrade to server context #252

Closed
jplhomer opened this issue Nov 16, 2021 · 1 comment · Fixed by #498
Closed

Remove react-router on the server, or upgrade to server context #252

jplhomer opened this issue Nov 16, 2021 · 1 comment · Fixed by #498
Assignees
Labels
framework Related to framework aspects of Hydrogen
Milestone

Comments

@jplhomer
Copy link
Contributor

Remove react-router on the server, and build our own simple routing engine powered by regex, OR upgrade it to server context (upstream)

@jplhomer jplhomer added the framework Related to framework aspects of Hydrogen label Nov 16, 2021
@morganmccunn morganmccunn added this to the v1.0.0 milestone Nov 17, 2021
@blittle blittle self-assigned this Nov 18, 2021
@blittle
Copy link
Contributor

blittle commented Dec 3, 2021

For some reason, this PR introduces a weird context problem. Details:

  1. The app loads fine with one browser
  2. If two separate browsers load the app at the same time or if you load the app and then quickly refresh before the initial streaming completes, a context error occurs.
  3. The context error shows up in the SSR streaming phase. Because of the error, the page goes white, but then the client eventually makes the hydration request. That succeeds and the page fully renders.
  4. It happens outside of vite, when running a production node server.
  5. Upgrading to the latest version of React 18 doesn't help

The context is phone, it's just for some reason it has the default context value (when it shouldn't). Somehow is global data like context getting bled between requests? Maybe the second request is reseting the context of the first?

rafaelstz pushed a commit to rafaelstz/hydrogen that referenced this issue Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Related to framework aspects of Hydrogen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants