Package: @effect/atom-react
Module: Hooks
Mounts an atom and returns a callback that refreshes it in the current React registry.
When to use
Use to expose a React callback that requests a refresh for an atom without reading or writing its value.
Details
The hook uses the current RegistryContext, mounts the atom for the
component lifetime, and returns a callback that calls registry.refresh.
See
useAtomMount for mounting an atom without returning a refresh callbackSignature
declare const useAtomRefresh: <A>(atom: Atom.Atom<A>) => () => void
Since v4.0.0