New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add react
function for working with exteral atom-like types
#546
Labels
Comments
Deraen
added a commit
that referenced
this issue
Sep 3, 2021
Started investigating this in #547 The implementation is indeed quite simple, as Ratom doesn't itself need to do much, just to register itself to reactive context, and the reactive context (reaction) just uses regular IWatchable protocol to listen for changes, and normal atoms implement that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reagent comes with several atom-like types that implement
IDeref
andIWatchable
, but to my knowledge does not support implementing your own data sources. In Rum there is areact
function that basically sets up the watcher and calls deref. Could Reagent support the same? From my limited understanding it'd basically beThis would enable implementing elegant reactive behavior over JS libraries, websockets, localstorage, you name it. Anything that supports taking the value and notifying changes.
Note that
notify-deref-watcher!
itself is a private function, so it's currently not kosher to implement this externally.The text was updated successfully, but these errors were encountered: