You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It adds custom refresh behavior to `ValueAtom` which is inherently unable to refresh.
875
-
It's useful when need to have arbitrary refresh behavior or implementing refresh when value depends on private atom.
876
-
In this example, `FetchMoviesPhaseAtom` transparently exposes the value of `FetchMoviesTaskAtom` as `AsyncPhase` so that the error can be handled easily inside the atom, and `Refreshable` gives refreshing behavior to `FetchMoviesPhaseAtom` itself.
It adds custom reset behavior to an atom that will be executed upon atom reset.
913
-
It's useful when need to have arbitrary reset behavior or implementing reset when value depends on private atom.
914
-
In following example, `RandomIntAtom` generates a random value using generated from private `RandomNumberGeneratorAtom`, and `Resettable` gives ability to replace exposed reset with `RandomNumberGeneratorAtom` reset.
0 commit comments