usePausableUpdateEffect

A React Hook like useUpdateEffect, but pausable.

Demo

Source
isEffectActive:
true
Dep count:
0
Count (inc via effect):
0

Usage

See API for more details.

Source

Click links below to view source on GitHub.

API

const pausable = usePausableUpdateEffect(callback, deps)

Callback

Same as React.useEffect.

Deps

Same as React.useEffect.

Returns

Retuerns contain Pausable instance that can be paused, resumed.

See Pausable for more details.

A Pausable instance.