This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-14
Channels
- # admin-announcements (2)
- # beginners (32)
- # boot (217)
- # cider (20)
- # cljsjs (25)
- # cljsrn (9)
- # clojure (87)
- # clojure-android (7)
- # clojure-austin (4)
- # clojure-belgium (10)
- # clojure-canada (13)
- # clojure-dev (28)
- # clojure-dusseldorf (2)
- # clojure-greece (119)
- # clojure-nl (1)
- # clojure-russia (22)
- # clojure-spain (3)
- # clojure-spec (81)
- # clojure-uk (54)
- # clojurescript (32)
- # community-development (2)
- # core-async (19)
- # cursive (18)
- # datascript (5)
- # datomic (1)
- # dirac (22)
- # emacs (22)
- # hoplon (198)
- # incanter (1)
- # instaparse (4)
- # jobs (3)
- # keechma (15)
- # ldnclj (2)
- # lein-figwheel (14)
- # mount (8)
- # om (78)
- # om-next (4)
- # onyx (37)
- # other-languages (1)
- # pedestal (6)
- # re-frame (22)
- # reagent (25)
- # ring-swagger (17)
- # robots (1)
- # slack-help (1)
- # spacemacs (7)
- # specter (50)
- # spirituality-ethics (3)
- # uncomplicate (5)
- # untangled (1)
- # yada (17)
Anybody have experience with https://github.com/reagent-project/reagent-forms ? I'm having trouble getting the form to refresh after data is loaded
I've finally got around to documenting re-frame's built in undo/redo. https://github.com/Day8/re-frame/wiki/Undo-&-Redo
@darwin It sounds like you're talking about this.. http://stackoverflow.com/questions/15423136/how-can-i-pass-edn-to-clojurescript-from-clojure-without-making-ajax-request-i
if your profile is just a string, instead of var edn, create var myString and emit that string there directly, without pr-str
and read-string
but be aware that you should escape that string, so it does not contain quotes, etc. so it is a valid javascript
@tawus yep, that was the first use case for dynamic subscriptions (we were using websockets, but same principle)
@danielcompton: If I understand correctly, the dynamic subscription should return the newly calculated value but with an ajax call, how can we do that ? Sorry if it is something obvious.
I see that the todos example uses 'js/localStorage' , but came across a few other options and thought I would ask for guidance 🙂
@javazquez: alandipert has a local storage atom lib
The dynamic subscription will return a ratom which will initially be empty, then when your result comes back, it will swap the result into that ratom
We tend to do side effecting things through handlers now though
So there would be a request for data, which would callback to a handler when data was received
@symbit: ah, you had the parameter already present in url, so it is kinda pointless to emit it as javascript variable, url parameters can be easily read from javascript
Thanks @danielcompton
thanks @danielcompton, trying to understand the how to "wrap" the ratom from db.cljs
is the advice to create a separate atom for this library and update it in the handlers ?
(register-sub
:sub-side-effect
(fn [db [_ params]]
(let [ratom (r/atom {:status :pending})]
(ajax/call "" params
:on-success #(reset! ratom %)
:on-error #(reset! ratom %))
ratom)))
something like that, that’s just pseudo code