You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, user will see light mode for a split second before the dark mode applies on page reload/visit. The reason is there’s a pause after user visits the page until the dark mode script runs.
Currently, user will see light mode for a split second before the dark mode applies on page reload/visit. The reason is there’s a pause after user visits the page until the dark mode script runs.
There’s probably an off-the-shelf library that takes care of the flash like next-themes. Or since we already have the logic for setting dark mode, the final stretch is to move it to a
<script>
tag before the<body>
as outlined in https://hangindev.com/blog/avoid-flash-of-default-theme-an-implementation-of-dark-mode-in-react-appThe text was updated successfully, but these errors were encountered: