Replies: 2 comments
-
|
Hi @rhefner, This was done to support suspense and concurrent features in React 18. I don't see a flash in the attached CodeSandbox, and your setup looks okay to me. I'll move this to a discussion to facilitate more ideas. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @segunadebayo - Thank you for taking a look! I'm not sure why you don't see it, but I've tried it on multiple computers and web browsers and still see it. I've recorded a screencap if you want to take a look. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When I change the color mode, I expect there not to be a flash. With an older version of Chakra, there is no flash. Any newer version of Chakra flashes when switching color modes.
Link to Reproduction
https://codesandbox.io/s/remix-chakra-color-mode-flash-796npi
Steps to reproduce
To see the example with no flash:
Chakra UI Version
2.2.6
Browser
Google Chrome 104, Firefox 103
Operating System
Additional Information
I think the issue came from this PR (specifically this change) which was needed for Next.js.
I'm not a Next user, but I do use Remix and Chakra was working fine up until v2.2.4 which I believe has the issue. Any release I've tried after seems to have the same problem and I haven't found a solution on the Remix side to stop it, though I'm no expert. I'd prefer not to
patch-package, so I decided to file this to see if anything can be done or if I'm doing something wrong.Using package versions below, there is no flash:
When I upgrade the packages to anything higher than what's above, then the flash is introduced. Example used:
Using the later versions in my local dev environment, I manually edited
node_modules/@chakra-ui/color-mode/dist/chakra-ui-color-mode.esm.jsto useuseSafeLayoutEffectand the flash stopped.Beta Was this translation helpful? Give feedback.
All reactions