solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
209 stars 24 forks source link

Using debounce from solid-primitives causes warnings #84

Open aminya opened 1 year ago

aminya commented 1 year ago

Describe the bug

Using debounce from @solid-primitives causes reactivity warnings:

To Reproduce

The reactive variable 'onClick' should be used within JSX, a tracked scope (like createEffect), or inside an event handler function, or else changes will be ignored.eslint[solid/reactivity](https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/reactivity.md)
import { debounce } from '@solid-primitives/scheduled';

function MyComponent() {
    const [something, _] = createSignal(true)
    const onClick = doubounce(() => something(), 1000) // causes warnings
}

Expected behavior No warnings

Screenshots

Environment (please complete the following information):

Additional context

aminya commented 2 months ago

Is this a real warning or a false positive?