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 would be nice if focusAtom worked with Setter type from optics-ts.
Using it with focusAtom should produce a write-only atom.
One possible use case would be to allow for appending to an array inside an atom, like this:
As far as I can tell, it should work with the current implementation, we only need to change typing for focusAtom to accept Setter optic and return corresponding WritableAtom.
If it sounds like something worth supporting, I can create a PR with that change.
The text was updated successfully, but these errors were encountered:
It would be nice if
focusAtom
worked withSetter
type from optics-ts.Using it with
focusAtom
should produce a write-only atom.One possible use case would be to allow for appending to an array inside an atom, like this:
As far as I can tell, it should work with the current implementation, we only need to change typing for
focusAtom
to acceptSetter
optic and return correspondingWritableAtom
.If it sounds like something worth supporting, I can create a PR with that change.
The text was updated successfully, but these errors were encountered: