Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

👻 Primitive and flexible state management for React
Go to Latest
function splitAtom
import { splitAtom } from "https://deno.land/x/jotai@v2.1.1/src/vanilla/utils/splitAtom.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