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
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 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 "<http://abc.com/endpont>" :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 https://gist.github.com/olivergeorge/875e5a3099e849be0ac4e87baef57fbf

1👍
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.

1
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!

2020-08-11T16:16:36.326800Z

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 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 ?

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

Something like this:

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

1👍
2020-08-11T16:42:01.327200Z

Thanks!

2020-08-11T17:18:34.327700Z

I got it working now, thanks!

2