MCPcopy Create free account
hub / github.com/Effect-TS/effect / useAtomRefProp

Function useAtomRefProp

packages/atom/react/src/Hooks.ts:462–463  ·  view source on GitHub ↗
(ref: AtomRef.AtomRef<A>, prop: K)

Source from the content-addressed store, hash-verified

460 * @since 4.0.0
461 */
462export const useAtomRefProp = <A, K extends keyof A>(ref: AtomRef.AtomRef<A>, prop: K): AtomRef.AtomRef<A[K]> =>
463 React.useMemo(() => ref.prop(prop), [ref, prop])
464
465/**
466 * Subscribes to a property ref derived from an atom ref and returns its current

Callers 1

useAtomRefPropValueFunction · 0.70

Calls 1

propMethod · 0.45

Tested by

no test coverage detected