Oliver George 2020-08-11T00:19:11.318600Z

Does this looks attractive to other re-frame users? If so, might be good to show your support

(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 George 2020-08-11T06:18:22.319700Z

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

Oliver George 2020-08-11T06:18:26.319800Z

Grant Isom 2020-08-11T14:58:19.320400Z

Is it possible to ignore a dispatch in a test?

Grant Isom 2020-08-11T14:58:43.320900Z

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

p-himik 2020-08-11T16:04:52.321Z

You can override an event handler by calling reg-event-fx again with the same ID.

p-himik 2020-08-11T16:05:13.321300Z

And modifying the fx map conditionally can be done with a global interceptor that's added only for tests.

borkdude 2020-08-11T16:10:04.321900Z

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

borkdude 2020-08-11T16:12:16.322100Z

:on-cancel, thanks!


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?

superstructor 2020-08-12T07:05:19.328900Z

@danielmartincraig re-frame-template should create this code for you from Did you happen to delete core or re-write it ? Or is that problem reproducible somehow with a freshly generated project ?

isak 2020-08-11T16:19:23.326900Z

Something like this:

(defn ^:dev/after-load render []
  (reagent/render [my-root-component] (. js/document (getElementById "app"))))




I got it working now, thanks!