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

require using return value of useProxy #49

Open
nmay231 opened this issue May 30, 2024 · 0 comments
Open

require using return value of useProxy #49

nmay231 opened this issue May 30, 2024 · 0 comments

Comments

@nmay231
Copy link

nmay231 commented May 30, 2024

I have a component that originally used useSnapshot(proxyObject) to rerender whenever any part of the recursive object changed. I absentmindedly updated it to useProxy(...) and it broke without my knowledge.

Since useProxy(...) by itself (no assignment or attr access) is useless, I think this plugin should warn about either switching to useSnapshot(...) if you want a catch-all rerender or to use the result returned to subscribe to specific changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant