Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maartenbreddels opened this issue Mar 26, 2024 · 0 comments
Open
Labels
footgun Common ways to shoot yourself in the foot

Comments

@maartenbreddels
Copy link
Contributor

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.

@iisakkirotko iisakkirotko added the footgun Common ways to shoot yourself in the foot label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
footgun Common ways to shoot yourself in the foot
Projects
None yet
Development

No branches or pull requests

2 participants