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

Using debounce from solid-primitives causes warnings #84

Open
1 task
aminya opened this issue Mar 14, 2023 · 1 comment
Open
1 task

Using debounce from solid-primitives causes warnings #84

aminya opened this issue Mar 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aminya
Copy link

aminya commented Mar 14, 2023

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):

  • OS: [e.g. Mac OS 11, Windows 10]
  • Node version (node --version): 18.14.2
  • eslint-plugin-solid version (npm list eslint-plugin-solid/yarn why eslint-plugin-solid): 0.11.0
  • eslint version (npm list eslint/yarn why eslint): 8.35

Additional context

  • I would be willing to contribute a PR to fix this issue
@aminya aminya added the bug Something isn't working label Mar 14, 2023
@aminya aminya changed the title Using debounce form solid-primitives causes warnings Using debounce from solid-primitives causes warnings Mar 26, 2023
@aminya
Copy link
Author

aminya commented May 4, 2024

Is this a real warning or a false positive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants