This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-05
Channels
- # bangalore-clj (4)
- # beginners (16)
- # boot (4)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (177)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-russia (41)
- # clojure-spec (3)
- # clojure-uk (21)
- # clojurescript (46)
- # code-art (1)
- # datomic (10)
- # hoplon (125)
- # leiningen (1)
- # luminus (2)
- # lumo (1)
- # off-topic (10)
- # onyx (69)
- # re-frame (22)
- # reagent (4)
- # ring (32)
- # rum (6)
- # specter (2)
- # untangled (5)
I'm having a strange problem and wondering if anyone has any quick ideas on a problem I'm having...If I run the following code from figwheel it works fine.
(ajax-request {:uri "http://10.211.55.4:3000/api/session" :method :get :params {:scode "A1B2C3"} :format (url-request-format) :response-format (json-response-format) :timeout 5000 :handler #(dispatch [:good-http-result %1])})
If I run it from inside my handler the request always times out.
I've used reg-event-fx as well it will always timeout.
That works fine.
I'm running the server on a Linux VM and I should also add that this is a react native project running on my Mac.
and as it turns out it only happens when running on my actual iOS device. The simulator works fine. I normally don't develop with the simulator because I use the camera a lot in my app.
@victorvoid are you listening to history changes? .e.g.,:
(e/listen history h/EventType.NAVIGATE
(fn [e]
(my-nav-function (token->location (.-token e)))))
I'm noticing something really strange with this event
https://github.com/AndreaCrotti/scrabble/blob/master/src/cljs/scrabble/events.cljs#L48
ini short if I load the page and just trigger that event nothing happens
then I go to the events.cljs file, I reload it
and then it works
can't figure out what's going on with it
is there a reason why the event would not be triggered the first time?
@andrea.crotti are you missing scrabble.events in a require?
It's odd all the other work fine
This is the only one doing an http request though
I can probably try the second way of defining this event