Closed emacsbliss closed 1 year ago
No support questions in here please. This is a place for bug reports and feature requests only.
Support requests and usage questions should go to the #reagent channel in Clojure Slack or the ClojureScript mailing list.
Your example doesn't show how the button to toggle the mode state works or how the state is passed to MUI to tell which palette to use. You need to store the state in either a Reagent atom or React state hook, or otherwise tell Reagent to render the whole app again if Reagent isn't able to automatically see what parts need to be re-rendered.
I have this clojurescript code:
There is a button which toggle between dark and light them. The problem seems that the IconButton wrapped in ThemeProvider didn't flip its color (ie, white in dark mode, or black in light mode) when I toggle light/dark mode.
but that behavior works in javascript, so not sure if I missed anything when using reagent for this.
Thanks a lot for help!