useEffectEvent

Under Construction

This API is experimental and is not available in a stable version of React yet.

See useEffectEvent RFC for details.

useEffectEvent is a React Hook that lets you extract non-reactive logic into an Effect Event.

const onSomething = useEffectEvent(callback)