Bug when using "style jsx" to add custom color in nextjs 15 #71062
Unanswered
Wilian-Pereira-W
asked this question in
Help
Replies: 1 comment
-
@Wilian-Pereira-W I believe you need to set it up like this with App Router → https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-jsx. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/interesting-shtern-xxnk7m?file=%2Fapp%2Fcomponents%2FTest%2Findex.tsx%3A10%2C8-10%2C17
To Reproduce
When I reload the page, the default color is applied first, and then the custom color follows. This causes a flashing effect on the user's screen. It happens in development, build, and production environments.
Current vs. Expected behavior
When I reload the page it adds the default color first and then the custom color. Flashing on the user's screen. It should keep the custom color.
Gravação de tela de 03-10-2024 10:45:51.webm
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions