Skip to content

Relax passing onSomething callbacks as parameter #196

@elsassph

Description

@elsassph

Describe the need
We use a lot of debouncing/throttling like which we set up outside of tracked scope:

const throttledDrag = throttle(onDrag, DRAG_THROTTLE); // <-- solid/reactivity for `onDrag`

There is already some relaxing to props access inside an onSomething function, but we can't pass this function around, like for those helpers.

Suggested Solution

Relax (or have an option to) relax this pattern.

Possible Alternatives

We can cheat and create a bunch of aliases where throttle is renamed createThrottle but that would be ambiguous.

Additional context

  • I would be willing to contribute a PR to implement this feature

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions