-
Notifications
You must be signed in to change notification settings - Fork 323
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
Hydrogen apps should render something by default when JS is disabled #1309
Comments
OK weird — it works just fine locally, even on a production build 🤔 Something off about the CF Worker build? https://template-default.hydrogen-devs.workers.dev/ Even with streaming on e.g. Netlify, it's blank https://hydrogen-edge-demo.netlify.app/ |
It seems the content is actually all there in the response, but all the top-level divs have a |
Right - for some reason, React adds an extra "template" and uses a script to shove it in there. In development, it doesn't seem to do so? |
Chiming in - our SEO consultant said that he fixed up the problem the same way |
I've isolated this issue to be specific to Cloudflare's Turns out that new streams created with This means Cloudflare/Oxygen streams don't respect the buffering logic we have in place in Hydrogen to support search engine crawlers and other bots. I've reported this to Cloudflare, and they're working on a fix. I'll update y'all here when it's shipped! cc @benjaminsehl |
Update: fix will be shipped in React 18.2 as well. You can get it early by using |
@jplhomer was playing around on the demo-store/neue branch and noticed that on |
I still see this problem running Hydrogen on Oxygen, React 18.2.0. |
@jplhomer the issue is still there also on react 18.2.0 |
@jaredkc @apalumbo what do your We probably need to tidy up the demo store template with some Suspense boundaries, but it ultimately comes down to how you have structured your app. |
@jplhomer I went through the process of adding the Hydrogen Channel to Shopify with the demo store. The site displays a blank page when JavaScript is disabled out of the box with no code changes. The HTML is in place. However, many I just looked at the latest App.server. Some changes are not included in the version I started with. I'll get the updates in place to see if it helps address my issue. |
@jplhomer I just forked the hydrogen demo store |
Today, it's a blank page.
How can we "flush" the app properly so that at least the first Suspense fallback is rendered?
Is it because we're lacing our entry-server with
<Suspense fallback={null}>
when really we shouldn't?The text was updated successfully, but these errors were encountered: