Fork me on GitHub
#re-frame
<
2017-09-12
>
madstap03:09:48

Quick newbie question. Can re-frame-http-fx do cors requests out of the box?

danielcompton05:09:55

re-frame-http-fx is a thin layer over cljs-ajax, so anything you can do with that you can do with re-frame-http-fx

dobladez13:09:00

Hi... Is there a way to change the list of "default" interceptors? other than implementing my own version of reg-event-* ?

dobladez14:09:14

From what I see in the code, it's not possible. Is this an intentional decision? Wouldn't it be handy to have a way to configure default interceptors for all handlers?

danielneal15:09:09

I think I saw this discussed somewhere, can't remember where though. You can make your own version of reg-event-db and reg-event-fx which have the default interceptors you want, and then use your new version in their place

yedi15:09:25

does anyone have any resources/examples on using core.spec to handle form input validation?

kasuko16:09:00

Essentially it comes down to the fact that since it’s so easy to wrap your own to include global interceptors it’s not really worth it making the default behaviour more complicated to achieve a “global” solution.

dobladez16:09:18

Well, it's easy if you are starting a new app... For an existing codebase, you have to replace all call-sites. Not the end of the world either... but would be nice for it to be configurable. Thanks!

kasuko16:09:21

If you have require’s all over the place for [re-frame.core :as re-frame] since re-frame’s API is pretty small it’s super easy to mask it entirely with a simple wrapper in myproject.re-frame and then search and replace the original re-frame namespace with [myproject.re-frame :as re-frame]