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

solid/reactivity warning while directly mutating a createMutable state #99

Open
1 task done
seahindeniz opened this issue Jun 18, 2023 · 1 comment
Open
1 task done
Assignees
Labels
bug Something isn't working reactivity v2 To be addressed in the rewrite of the solid/reactivity rule

Comments

@seahindeniz
Copy link

Describe the bug

When I try to update a property to trigger an update, ESLint gives a warning
image

To Reproduce

Using recommended setup and following the documentation about createMutable suffice to reproduce
https://www.solidjs.com/docs/latest/api#createmutable

Expected behavior
No warning for directly mutating. At least from the expected updating facilitators that I specifically declare to update the main state. Like in the state-action principle.

Screenshots

Environment (please complete the following information):

  • OS: [e.g. Mac OS 11, Windows 10] mac 13
  • Node version (node --version): 14
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.12.1
  • eslint version (npm list eslint/yarn why eslint):8.42.0

Additional context

  • I would be willing to contribute a PR to fix this issue (probably, although understanding the structure might take a while)
@seahindeniz seahindeniz added the bug Something isn't working label Jun 18, 2023
@joshwilsonvu joshwilsonvu added the reactivity v2 To be addressed in the rewrite of the solid/reactivity rule label Aug 20, 2023
@linorabolini
Copy link

Thank god this is being addressed. I believe createMutable is an amazing feature no one is talking about. Being able to use reactive plain JS is incredible. But people get afraid of the warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reactivity v2 To be addressed in the rewrite of the solid/reactivity rule
Projects
None yet
Development

No branches or pull requests

3 participants