Fork me on GitHub
#re-frame
<
2020-08-11
>
Oliver George00:08:11

Does this looks attractive to other re-frame users? If so, might be good to show your support https://github.com/day8/re-frame/issues/639#issuecomment-671616527.

(defn set-something [m]
  (assoc-in m [:db :something] (get-in m [:event 1])))

(defn fetch-data [m]
  (update-in m [:fx] conj {:http {:url "" :method "GET"}}))

(defn dispatch-other [m]
  (update-in m [:fx] conj {:dispatch [:other]}))

(reg-event-fx2 :token (comp set-something fetch-data dispatch-other))

Oliver George06:08:22

Nothing like trying to rewrite re-frame to prove re-frame is well designed. Here's where I got to before I realised that I was missing lots of secondary goodness https://gist.github.com/olivergeorge/875e5a3099e849be0ac4e87baef57fbf

👍 3
Grant Isom14:08:19

Is it possible to ignore a dispatch in a test?

Grant Isom14:08:43

I don't want to execute a graphql query but want the other events in the dispatch-n to be fired off

borkdude16:08:04

I'm using re-com. Is there a built-in way to close a popover when you click outside of it?

borkdude16:08:16

:on-cancel, thanks!

Daniel Craig16:08:36

Hi all, I created a new re-frame app with the re-frame-template. With Shadow CLJS running, when I save the app my app is rebuilt but I still have to push refresh to see my updates in the browser. What config do I need to add to see the updates automatically?

Daniel Craig17:08:34

I got it working now, thanks!

6
superstructor07:08:19

@USDPTD3FY re-frame-template should create this code for you from https://github.com/day8/re-frame-template/blob/master/src/leiningen/new/re_frame/src/cljs/core.cljs#L18 Did you happen to delete core or re-write it ? Or is that problem reproducible somehow with a freshly generated project ?