Closed drgarlic closed 9 months ago
Describe the bug
ESLint shows a warning:
This function should be passed to a tracked scope (like createEffect) or an event handler because it contains reactivity, or else changes will be ignored.eslintsolid/reactivity
When using a prop or several props as dependency(ies) in on() like so:
on()
createEffect( on( () => props.show, (show) => show && setState('zIndex', 100), ), )
To Reproduce
The upper code
Expected behavior
To not show a warning when the code is right
Screenshots
Environment (please complete the following information):
node --version
eslint-plugin-solid
npm list eslint-plugin-solid
yarn why eslint-plugin-solid
eslint
npm list eslint
yarn why eslint
Additional context
Looks like I can no longer reproduce this, must have fixed the issue. Feel free to reopen if I'm mistaken.
https://playground.solidjs.com/anonymous/c8858afd-2aa7-4366-9af0-977e650915ea
Describe the bug
ESLint shows a warning:
When using a prop or several props as dependency(ies) in
on()
like so:To Reproduce
The upper code
Expected behavior
To not show a warning when the code is right
Screenshots
Environment (please complete the following information):
node --version
): latesteslint-plugin-solid
version (npm list eslint-plugin-solid
/yarn why eslint-plugin-solid
): latesteslint
version (npm list eslint
/yarn why eslint
): latestAdditional context