useRecoilState<T> function

RecoilNotifier<T> useRecoilState<T>(
  1. Atom<T> atom
)

Returns a custom ValueNotifier of an Atom and subscribes the components to future updates of that state.

The return type of useRecoilState() it's RecoilNotifier which provides parameters for reading and manipulating the state of an Atom.

  • data can be used in order to get the value of the Atom
  • setData can be used to change the value of the Atom

See also:

Implementation

RecoilNotifier<T> useRecoilState<T>(Atom<T> atom) => _useRecoilState(atom);