widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.6k stars 104 forks source link

footgun: using a reactive var, not its value as a dependency #572

Open maartenbreddels opened 1 month ago

maartenbreddels commented 1 month ago
var = solara.reactive(1)

    ...
    solara.use_effect(..., dependencies=[var])

A user probably intended to use var.value, since the effect should trigger when the value changes. I think we should warn when this happens, and have an opt out for this warning.