Replies: 1 comment 2 replies
-
There is an onChange reducer in the IsoWords project, quite similar to this. Seems like a very useful concept! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on an app where I need to save data to disks whenever the user edits something. I ended up with a reducer that allows me to trigger an effect whenever the watched value changes, akin to SwiftUI's
onChange(of:)
modifier. Example use case:Later I found it to be more useful than I thought. For instance, I have been using it to watch my app state and update notifications and widgets. Questions:
My sample implementation, hopefully it is bug-free:
Beta Was this translation helpful? Give feedback.
All reactions