Package: @effect/atom-react
Module: Hooks
Subscribes to an atom ref and returns its latest value.
When to use
Use when a React component should render from an AtomRef.ReadonlyRef
directly instead of reading an atom through the current registry.
Details
The hook subscribes with ref.subscribe, triggers re-renders through React
state, and returns the current ref.value.
See
useAtomValue for reading an Atom from the current registryuseAtomRefPropValue for reading a property ref valueSignature
declare const useAtomRef: <A>(ref: AtomRef.ReadonlyRef<A>) => A
Since v4.0.0