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

Function mountAtom

packages/atom/react/src/Hooks.ts:125–127  ·  view source on GitHub ↗
(registry: AtomRegistry.AtomRegistry, atom: Atom.Atom<A>)

Source from the content-addressed store, hash-verified

123}
124
125function mountAtom<A>(registry: AtomRegistry.AtomRegistry, atom: Atom.Atom<A>): void {
126 React.useEffect(() => registry.mount(atom), [atom, registry])
127}
128
129function setAtom<R, W, Mode extends "value" | "promise" | "promiseExit" = never>(
130 registry: AtomRegistry.AtomRegistry,

Callers 3

useAtomMountFunction · 0.70
useAtomSetFunction · 0.70
useAtomRefreshFunction · 0.70

Calls 1

mountMethod · 0.65

Tested by

no test coverage detected