Fork me on GitHub

so another question, I want to dispatch an event when a local atom changes, is putting a (run! (dispatch @atom)) in a form-2 component bad form?


@l1sp3r Why do you have the wrapping run? And when does the local atom change?


@mikethompson hi, did you look at the PR for gitbook integration ?


@curlyfry local atom changes when user inputs to a text field.


@l1sp3r Personally I’d be more likely to set things up so that the original update event would dispatch two events, one to update the local atom, and the second to be whatever event you want to fire when the local atom changes


but perhaps I’m not understanding your use case here.


hey @lxsameer! I've also been musing over gitbook integration but haven't felt bold enough to pull the trigger on putting in a PR :P cheers!


(I spent a while trying to format chapters nicely and eventually put it aside because it was taking quite a while to make it polished enough such that I felt happy with it. the search and overview functionality alone is pretty awesome though! I'm down to put more time into it if people would use it (: )


I liked playing around with plugins that made overviewing and navigation nice, like I got super into these collapsing/uncollapsing subsections: <---prototype


@daiyi Cool, if @mikethompson and other people in charge of re-frame decided to go for it, we can work together on this


Hi, I'm trying to post a GraphQL query using re-frame-http-fx, but the server does not receive the params which is sent. Simple GET using cljs-ajax works though. Following works:

(GET "/graphql" {:params {"query"  "{user(id:\"100\") {first_name}}"}})
Following doesn't work, both :params and :query-params are not populated as seen by server:
 (fn [{:keys [db]} _]
   {    :http-xhrio {:method          :get
                     :uri             "/graphql"
                     :params           {"query"  "{user(id:\"100\") {first_name}}"}
                     :response-format (json-response-format {:keywords? true})
                     :on-success      [:good-http-result]
                     :on-failure      [:bad-http-result]}}))
I read the ajax-request api in cljs-ajax, but couldn't isolate the issue. What am I doing wrong?


I think that you missed the :format (ajax/uri-request-format)


@souenzzo That solved it:) I tried with :format ajax/json-requestformat before but didn't try this . Excellent, thanks


Hi, does anyone know of a websocket equivalent of the :http-xhrio above? That is, a library that provides an idiomatic fx-handler for websocket communication?


I haven't used it - I remember looking for one, then I decided to try making my own fx handler


I'm not an expert, so it's probably not idiomatic or very good


@mike706574 Thanks, I’ll have a look.