Hi !
I saw this https://github.com/sergiodxa/react-router-color-scheme-example on x.
I was using the script trick to handle flash of uncorrect theme.
The solution that I use is with react query https://github.com/KirdesMF/tss-color-scheme, but I don't know if this can be simplified or if you have other solution to that. Actually it works as expected.
Thanks
#Dark mode color scheme
4 messages · Page 1 of 1 (latest)
I use react query because it helps to invalidate the color scheme, so I want to know if there is other way to "invalidate" or handle the update of the cookie
Any reason you're not using next-themes? It should work just as fine with TSS
If you encounter issues with it, there is this theme provider you can make and wrap your app with rather. https://gist.github.com/WellDone2094/16107a2a9476b28a5b394bee3fa1b8a3