This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-18
Channels
- # aleph (45)
- # aws (4)
- # beginners (56)
- # boot (2)
- # cider (45)
- # clara (2)
- # cljs-dev (9)
- # cljsrn (31)
- # clojure (71)
- # clojure-dusseldorf (8)
- # clojure-gamedev (1)
- # clojure-italy (22)
- # clojure-nl (1)
- # clojure-russia (46)
- # clojure-sg (1)
- # clojure-spec (5)
- # clojure-uk (40)
- # clojurescript (30)
- # community-development (3)
- # cursive (17)
- # data-science (1)
- # datomic (18)
- # emacs (3)
- # figwheel (1)
- # fulcro (19)
- # hoplon (12)
- # jobs (5)
- # leiningen (42)
- # off-topic (12)
- # om (2)
- # onyx (41)
- # re-frame (19)
- # ring-swagger (1)
- # rum (3)
- # shadow-cljs (4)
- # specter (7)
- # unrepl (2)
- # vim (25)
- # yada (24)
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?
@mikethompson hi, did you look at the PR for gitbook integration ?
@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: https://inkwing.gitbooks.io/re-frame/content/MentalModelOmnibus.html#guiding-philosophy <---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:
(reg-event-fx
:graphql-handler
(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?@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
Something like this: https://gist.github.com/mike706574/dcbd6610aea2f5ecd1c0f7d0e2cc8938
I'm not an expert, so it's probably not idiomatic or very good
@mike706574 Thanks, I’ll have a look.