usePausableLayoutEffect

A React Hook like React.useLayoutEffect, 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 = usePausableLayoutEffect(callback, deps)

Callback

Same as React.useLayoutEffect.

Deps

Same as React.useLayoutEffect.

Returns

Retuerns contain Pausable instance that can be paused, resumed.

See Pausable for more details.

A Pausable instance.