@solid-primitives/throttle
@solid-primitives/throttle
npm i @solid-primitives/throttle
Deprecated!
throttle primitive moved to @solid-primitives/scheduled
@solid-primitives/throttle

@solid-primitives/throttle

A library of high-quality primitives that extend SolidJS reactivity.

by solidjs-community

1.2.0 (see all)License:MITTypeScript:Built-In
npm i @solid-primitives/throttle
Readme

Solid Primitives Throttle

@solid-primitives/throttle

lerna size size stage

Creates a throttled function that invokes at most once per specified time.

When used in an reactive context (effect or component), any throttled function pending to execute will be automatically canceled when the context is cleaned up.

How to use it

const [trigger, clear] = createThrottle((value) => console.log(value), 250));
trigger('my-new-value');

Demo

You may view a working example here: https://codesandbox.io/s/solid-primitives-throttle-h2wni?file=/src/index.tsx

Changelog

Expand Changelog

0.0.100

First version of the throttle primitive.

1.0.3

Cleaned up return types and documentation.

1.0.8

Adding CJS support to package.

1.1.0

Updated to Solid 1.3

1.1.3

General clean-up and improvements by Joe Pea (trusktr)

Downloads/wk

111

GitHub Stars

435

LAST COMMIT

6mos ago

MAINTAINERS

3

CONTRIBUTORS

22

OPEN ISSUES

11

OPEN PRs

7
VersionTagPublished
1.2.0
latest
5mos ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate