This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-23
Channels
- # announcements (11)
- # babashka (35)
- # beginners (110)
- # calva (2)
- # cider (46)
- # clara (5)
- # clj-kondo (29)
- # cljdoc (4)
- # cljsrn (59)
- # clojure (163)
- # clojure-brasil (3)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (10)
- # clojure-sweden (1)
- # clojure-uk (36)
- # clojurescript (58)
- # conjure (24)
- # cursive (19)
- # data-science (14)
- # datascript (1)
- # datomic (10)
- # docker (3)
- # expound (6)
- # figwheel-main (17)
- # fulcro (16)
- # graalvm (1)
- # leiningen (9)
- # malli (11)
- # off-topic (22)
- # parinfer (1)
- # pathom (1)
- # re-frame (18)
- # reagent (18)
- # reitit (3)
- # ring (3)
- # shadow-cljs (8)
- # spacemacs (3)
- # specter (79)
- # sql (20)
- # tools-deps (25)
- # vim (4)
- # xtdb (8)
Where is the code for Domino 3 here: https://github.com/day8/re-frame/blob/master/examples/simple/src/simple/core.cljs? Does it happen automatically?
@somedude314
The simple
example, uses reg-event-db
And not reg-event-fx
So that means the event handlers only ever return an updated value for app-db
So that's teh only effect
IF it used reg-event-fx
instead, then the event handlers could return other effects
And, in that case, you might have needed to register effect handlers for those other effects
But, as it happens, there's a built-in effects handler for app-db so you don't need to supply it
The :dispatch here https://github.com/day8/re-frame/blob/master/docs/Effects.md?
That's a built in effect
So somewhere in re-frame is does this ...
(re-frame.cosre/reg-fx ;; <--- API for registering an effects handler
:dispatch ;; <--- the effect for which we are registering a handler
(fn [val] ;; <-- the handler which will action the effect
....
))
It is all explained on the page you are reading http://day8.github.io/re-frame/Effects/
hello there! I’m very excited with functional programming and decided to learn a functional language. I’ve been studying Clojure for a week, as a challenge, I want to port this personal project I was building with choojs and xstates. https://twitter.com/marlus/status/1247186858209050625 https://github.com/sulram/flowing Do you recommend a state chart lib to use with re-frame? Is there a book about re-frame?
@U0161F7JUJY The book on re-frame is here: :-) https://day8.github.io/re-frame/ Be sure to also look in here for other written material and video courses: https://day8.github.io/re-frame/External-Resources/ xstate is a very sophisticated library, and there isn't an equivalent for re-frame. Libraries like Chartjs and VegaLite (the one we use) are straight-forward to integrate.
hey, did anyone try reactn with reagent? -https://github.com/CharlesStover/reactn