-
-
Notifications
You must be signed in to change notification settings - Fork 715
Closed
Description
Sorry for my noob question. It seems to me that I can do what re-frame does in reagent by defining a single global atom like this:
;; data store
(def global-store (r/atom {... initial map ...}))
;; event/dispatcher
(defn change-page [page] (swap! global-store update :page page))
;; view
(defn webpage [] [:button {:on-click #(change-page "clicked")} (:page @global-store)])I know there must be something I am missing here. Could someone explain a bit on what advantages re-frame has over just using reagent? I googled and did not find an article on this.. Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels