Reading localstorage theme value before rendering components not working
I'm setting up a theme toggle. It can successfully set the theme in localstorage. When loading a specific theme from storage, there is a brief "flash" of the default theme before converting to the desired theme.
Here is the function that loads the theme from localstorage. It's being loaded within the
The script always seems to run before the components but I'm not sure why I still get the flash. Is this a bug?
Here is the function that loads the theme from localstorage. It's being loaded within the
<Head/> tag from Solid Start. The script always seems to run before the components but I'm not sure why I still get the flash. Is this a bug?
