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

Function useAtomRefProp

packages/atom/solid/src/Hooks.ts:328–331  ·  view source on GitHub ↗
(
  ref: () => AtomRef.AtomRef<A>,
  prop: K
)

Source from the content-addressed store, hash-verified

326 * @since 4.0.0
327 */
328export const useAtomRefProp = <A, K extends keyof A>(
329 ref: () => AtomRef.AtomRef<A>,
330 prop: K
331): Accessor<AtomRef.AtomRef<A[K]>> => createMemo(() => ref().prop(prop))
332
333/**
334 * Returns a Solid accessor for the value of a property ref derived from an atom

Callers 2

useAtomRefPropValueFunction · 0.70
index.test.tsxFile · 0.50

Calls 2

refFunction · 0.50
propMethod · 0.45

Tested by

no test coverage detected