Closed
Description
When clicking the button in the code below it's background color should change, but it does not:
import idom
@idom.component
def Test():
color_toggle, set_color_toggle = idom.hooks.use_state(False)
color = "red" if color_toggle else "blue"
return idom.html.div(
idom.html.button(
{
"onClick": lambda event: set_color_toggle(not color_toggle),
"style": {"backgroundColor": color, "color": "white"},
},
"toggle",
),
)
idom.run(Test, port=5000)
Originally reported by @jgburford in #478 (reply in thread)
Metadata
Metadata
Assignees
Labels
No labels