function useAtom<TValue>(atom, options?): [TValue, (fn) => void & (value) => void];Defined in: node_modules/.pnpm/@tanstack+react-store@0.11.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-store/dist/useAtom.d.ts:16
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, (fn) => void & (value) => void]
const [count, setCount] = useAtom(countAtom)