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
`Resettable` allows you to implement a custom reset behavior to an atom.
812
+
813
+
<details><summary><code>📖 Expand to see example</code></summary>
814
+
815
+
It adds custom reset behavior to an Atom that will be executed upon atom reset.
816
+
817
+
It's useful when need to have arbitrary reset ability or implementing reset when value depends on private atom.
818
+
819
+
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