Fork me on GitHub
#re-frame
<
2017-03-26
>
alanspringfield04:03:56

@jtth That book focused very much on the Luminus micro-framework, which I think is fantastic and takes care of a lot of the boilerplate for you.

alanspringfield04:03:15

I would say that is the deal book if you wanna get up and running quickly

tagore04:03:41

But... again, if you're just going to do an SPA using reframe...

tagore04:03:19

Ity will offer you an odd model.

tagore04:03:34

At some point you need to choose- is the display logic going to be on the server or on the client.

tagore04:03:39

If you want to write an SPA it should be on the client, and very little about what has been written about Clojure web apps is applicable.

tagore04:03:49

I think the fundamental distinion here is between documents and applications.

tagore04:03:32

If you want to serve a few customized documents you might want to use a server-side framework (and re-frame might not benefit you in that case)

tagore04:03:10

If you want to write an interactive in-browser app though...

tagore04:03:59

Well, my advice, after a few years of writing client-side apps, is that you shouldn't mix them much.

armed14:03:13

Hey, folks. I wrote simple effect to make ajax requests (using cljs-ajax):

(reg-fx
  :ajax-get
  (fn [{:keys [uri on-success]}]
    (GET uri
      {:handler #(dispatch [on-success %])
       :error-handler #(dispatch [:request-error %1])})))

armed14:03:40

re-frame throwed error that my on-success (i.e. :request-success) handler was not registered. I fixed error by copy-pasting code from http-fx library: (conj on-success %). The question is: why we need conj in this place?

armed14:03:29

oh, my bad. I was passing :on-success option as [:request-success] (collection).