本页还没有译文
本页 15 段还没译成한국어,下面显示的是英文原文。useAtom
还没翻译译自英文(tanstack.com)本页 15 段都还没译
function useAtom<TValue>(atom, options?): [TValue, (fn) => void & (value) => void];Defined in: packages/react-store/src/useAtom.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.
Type Parameters
TValue
TValue
Parameters
atom
Atom<TValue>
options?
UseSelectorOptions<TValue>
Returns
[TValue, (fn) => void & (value) => void]
Example
const [count, setCount] = useAtom(countAtom)AI 翻译查看英文原文