This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
Basic global state subscriptions + updates #42
Comments
Would something like this work for you? (def db (atom {:items [{:id 1}]}))
(def item-1 (cursor-in db [:items 0]))
(defn change-item! []
(swap! item-1 :id inc)) |
If derefs of |
Side note: another problem this would alleviate is not being able to render multiple apps in the same browser context because the current xframe impl uses only one |
This is a separate issue, feel free to file a ticket for that. |
Hi @roman01la! Anything I can do to help with this feature? I've looked over the xframe source but it goes above my head. But I could probably put a PR together w/ some pointers from you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem? Please describe.
I'm currently using the re-frame-like xframe for global subscriptions and state updates. However, in many of my use-cases I merely need
get
-like andget-in
-like subscriptions andassoc
/update
(-in
)-like handlers.Describe the solution you'd like
Reagent's ratom + cursor compatible with reacts hooks. Like this but global.
Describe alternatives you've considered
xframe has been my alternative so far. I think it would be nice to provide a less opinionated solution to global state updates and subscriptions.
The text was updated successfully, but these errors were encountered: