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

Function mountAtom

packages/atom/solid/src/Hooks.ts:79–83  ·  view source on GitHub ↗
(registry: AtomRegistry.AtomRegistry, atom: () => Atom.Atom<A>)

Source from the content-addressed store, hash-verified

77const constImmediate = { immediate: true }
78
79function mountAtom<A>(registry: AtomRegistry.AtomRegistry, atom: () => Atom.Atom<A>): void {
80 createComputed(() => {
81 onCleanup(registry.mount(atom()))
82 })
83}
84
85function setAtom<R, W, Mode extends "value" | "promise" | "promiseExit" = never>(
86 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