re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
adam 2020-06-23T02:39:18.006100Z

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?

2020-06-23T02:42:14.006800Z

@somedude314 The simple example, uses reg-event-db

2020-06-23T02:42:26.007200Z

And not reg-event-fx

2020-06-23T02:42:51.007800Z

So that means the event handlers only ever return an updated value for app-db

2020-06-23T02:42:57.008Z

So that's teh only effect

2020-06-23T02:43:28.008600Z

IF it used reg-event-fx instead, then the event handlers could return other effects

2020-06-23T02:43:49.009100Z

And, in that case, you might have needed to register effect handlers for those other effects

2020-06-23T02:45:47.010100Z

But, as it happens, there's a built-in effects handler for app-db so you don't need to supply it

adam 2020-06-23T02:47:08.010500Z

The :dispatch here https://github.com/day8/re-frame/blob/master/docs/Effects.md?

2020-06-23T02:48:09.011100Z

That's a built in effect

2020-06-23T02:49:22.012200Z

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
    ....
    ))  

2020-06-23T02:52:09.012800Z

It is all explained on the page you are reading http://day8.github.io/re-frame/Effects/

2020-06-23T02:52:18.013100Z

@somedude314 ^^

adam 2020-06-23T02:53:06.013300Z

Thanks a lot, I think I understand now. Will definitely go over the docs.

Marlus Araujo 2020-06-23T15:42:43.018Z

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?

manas_marthi 2020-06-23T16:39:38.018900Z

hey, did anyone try reactn with reagent? -https://github.com/CharlesStover/reactn

Lu 2020-06-23T17:44:00.019700Z

Chartjs react works great with re-frame

2020-06-23T22:43:05.019900Z

@m972 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.

💯 1