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
Right now we have a lot of duplication in the Atom code and the Slice code. because in addition to housing the value, the atom can be sliced and diced directly. Instead, let's refactor atom to be just a simple referefence to a subscription of values with set() method that allows you to publish a new value.
Then, Slice can just take an atom in its constructor, and everything in the app becomes a slice. We could even have a createAtom function, return a (root) slice:
Right now we have a lot of duplication in the Atom code and the Slice code. because in addition to housing the value, the atom can be sliced and diced directly. Instead, let's refactor atom to be just a simple referefence to a subscription of values with
set()
method that allows you to publish a new value.Then,
Slice
can just take an atom in its constructor, and everything in the app becomes a slice. We could even have acreateAtom
function, return a (root) slice:The text was updated successfully, but these errors were encountered: