werkbank
    Preparing search index...

    Function useAtom

    • A combined hook that returns both state and mutators.

      Type Parameters

      • S

        The state type.

      • R extends ReducerMap<any>

        The reducer map type.

      Parameters

      • atom: Atom<S, R>

        The atom definition.

      Returns readonly [S, UseSetAtom<R>]

      A tuple [state, actions].