werkbank
    Preparing search index...

    Function useAtomState

    • Subscribes to the state of an atom.

      Type Parameters

      • S

        The state type.

      Parameters

      • atom: Atom<S, any>

        The atom to subscribe to.

      • Optionalcomparator: Comparator<S>

        Optional comparator function to determine if state has changed.

      Returns S

      The current state of the atom.