This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-27
Channels
- # aws-lambda (3)
- # beginners (3)
- # boot (327)
- # capetown (2)
- # cider (156)
- # cljs-dev (368)
- # cljsjs (13)
- # cljsrn (53)
- # clojure (403)
- # clojure-czech (5)
- # clojure-dev (4)
- # clojure-greece (2)
- # clojure-russia (72)
- # clojure-spec (12)
- # clojure-uk (129)
- # clojurescript (156)
- # core-async (1)
- # cursive (33)
- # datomic (35)
- # emacs (10)
- # events (1)
- # hoplon (4)
- # jobs-discuss (3)
- # klipse (1)
- # lein-figwheel (14)
- # leiningen (5)
- # luminus (5)
- # off-topic (15)
- # om (69)
- # om-next (2)
- # onyx (2)
- # parinfer (15)
- # perun (12)
- # re-frame (30)
- # reagent (7)
- # ring-swagger (8)
- # spacemacs (10)
- # specter (6)
- # untangled (69)
- # yada (13)
@akiroz I think it's possible since IIRC re-frisk can show you the registered event handlers
mind you it means poking about inside re-frame.registrar
to access the atom in there
I keep getting:
{:http-xhrio {:method :delete
:uri (str server-url "/api/signals/" uuid)
:timeout 20000
:request-format (json-request-format)
:response-format
(json-response-format)
:on-success
[:signals/good-delete]
:on-failure [:datahub/bad-response]}
:db db}
Uncaught Error: ["unrecognized request format: " nil]
What is this?Is (json-request-format)
returning nil?
@borkdude: There's some info in the todomvc example - https://github.com/Day8/re-frame/blob/master/examples/todomvc/src/todomvc/subs.cljs I'm not sure if there's anything better or more up to date though, I've been a bit out of the loop on the most recent docs changes.
I have isolated the problem to:
(ajax/ajax-request {:method :delete
:uri "/api/signals/e6ff5cf2-e484-11e6-a243-0242ac110003"
:timeout 20000
:handler (fn [[ok response]] (println response))
:response-format (json-response-format {:keywords? true})})
@manutter51 it doesn’t matter if I provide the response-format or not. It complains about the request format.
:request-format
should be :format
, DOH! That is actually not the first time I’ve had this with cljs-ajax
are there any examples out there where published es6 components(those that extend React.Component) have been used in reagent/re-frame. I am having a really difficult time finding one. Without this I'd just be forced into using the traditional javascript to build the app which i really dont want to do.
@rohit where are you running into trouble?
with reagent, use [:> js/MyReact.Component {:prop1 :val1 :prop2 :vl2} child1 child2 ...]
if the component expects a callback that returns an element, use r/as-element
many components are already packaged in cljsjs
be careful to pass in javascript arrays/objects etc instead of vectors/maps, if the component expects a collection
be aware of externs when you're using adv compilation
that's all there is to it really
I'm just looking for examples really this is good
did not know about [:>]
@rohit_, as an example check this gist I just created: https://gist.github.com/pesterhazy/4a4198a9cc040bf6fe13a476f25bac2c
it shows how to use the (excellent) react-select component
this is good