react-atom
react-atom copied to clipboard
Atom constructor `options` argument
For example, in Clojure, swap! takes an optional validatorFn. See Clojure docs: https://clojuredocs.org/clojure.core/atom. This could potentially make swap and set more type-safe for JS.
Perhaps additional options, like a atomWillUpdate and atomDidUpdate callbacks could be useful. ???