function useAtom<TValue>(
atom,
options?,
): [TValue, Atom<TValue>['set']];Defined in: octane-store/src/useAtom.ts:17
Returns the current atom value together with a stable setter.
This is the writable-atom convenience hook for components that need to both read and update the same atom.
TValue
Atom<TValue>
UseSelectorOptions<TValue>
[TValue, Atom<TValue>["set"]]
const [count, setCount] = useAtom(countAtom)