-
Notifications
You must be signed in to change notification settings - Fork 68
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
Gatsby hydration/client-side re-render issue #154
Comments
Also posted here: system-ui/theme-ui#1568 |
Update: The issue seems to be triggered by the gatsby prefetch mechanism when hovering over the link. I cannot yet pinpoint what distinguishes those links from others |
Update: I narrowed down which prefetched pages cause the bug. Example: // src/pages/start-page.js
import * as React from "react"
import {Link} from "gatsby"
const StartPage = () => <Link to="/page-with-keyframes">Go to page with @emotion/react keyframes call</Link>
export default StartPage
// src/pages/page-with-keyframes.js
import * as React from "react"
import {keyframes} from "@emotion/react"
const unused = keyframes``
const PageWithKeyframes = () => <div>Empty</div>
export default PageWithKeyframes Note that |
Input
Run
gatsby build && gatsby serve
Output
When hovering over the link, further data is fetched and the styles "break". I assume this is somehow related to hydration, or at least the first client-side re-render.
The global styles (
styles.global
intheme.js
) seem to get lost.Remarks
The issue does not occur in dev mode (
gatsby develop
).The text was updated successfully, but these errors were encountered: