Module

x/jotai/src/vanilla/utils.ts>splitAtom

👻 Primitive and flexible state management for React
Latest
function splitAtom
import { splitAtom } from "https://dotland.deno.dev/x/jotai@v2.10.2/src/vanilla/utils.ts";

Parameters

arrAtom: WritableAtom<Item[], [Item[]], void>
optional
keyExtractor: (item: Item) => Key

Returns

WritableAtom<PrimitiveAtom<Item>[], [SplitAtomAction<Item>], void>

Parameters

arrAtom: Atom<Item[]>
optional
keyExtractor: (item: Item) => Key

Returns

Atom<Atom<Item>[]>