This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-28
Channels
- # beginners (33)
- # boot (58)
- # cider (21)
- # cljs-dev (197)
- # cljsrn (112)
- # clojure (136)
- # clojure-belgium (5)
- # clojure-dev (57)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (6)
- # clojure-spec (148)
- # clojure-uk (54)
- # clojurescript (29)
- # cursive (24)
- # datomic (36)
- # devops (4)
- # emacs (11)
- # figwheel (1)
- # graphql (18)
- # hoplon (6)
- # leiningen (2)
- # luminus (4)
- # off-topic (7)
- # om (4)
- # onyx (27)
- # precept (1)
- # protorepl (12)
- # quil (1)
- # re-frame (28)
- # reagent (10)
- # ring (9)
- # robots (1)
- # rum (2)
- # slack-help (5)
- # spacemacs (16)
- # sql (16)
- # untangled (16)
- # vim (3)
- # yada (2)
@pandeiro yeah that's a common trip up for people
danielcompton: this portion of the cljs-ajax README sort of implies that the values for :format
are keywords (e.g., :transit
is specified as the default value): https://github.com/JulianBirch/cljs-ajax#getpostput
See https://github.com/JulianBirch/cljs-ajax#ajax-request, that's the implementation we use
I created a PR for https://github.com/JulianBirch/cljs-ajax/pull/161, but there hasn't been a release with it yet
Hey all, if anyone here is familiar with .dirs-local.el I'd appreciate either your thoughts on this ticket, or your help via a PR 🙂 https://github.com/Day8/re-frame-template/issues/49
when using the :<-
dynamic subscription shorthand there's no access to app-db, right?
(reg-sub
:test-dynamic
:<- [:another-subscription]
(fn [dynamic-subscription-vec evt]
"Where's app-db?"
true))
@joshkh i suppose it's intentional so you could define subscriptions strictly in terms of other subscriptions so re-frame could efficiently narrow down list of subscriptions to check after every handler update
Hi, I'm coming up to speed with re-frame. I was curious about making multiple changes to app-db inside a -db or -fx handler. The page I'm reading makes it seem like this is a bad idea and multiple changes should be handled by multiple events. Am I interpreting this correctly?
I'm curious if anyone has made any attempts to automatically graph re-frame subscription relationships?
I have a fairly convoluted component I'm working on and spent the better part of last night diagramming it out in graphviz
it proved useful if tedious to compile, and I was thinking I could write a macro to help with that part
@dealy If you mean updating multiple keys in the app-db then I think there's nothing wrong with that. I would do something like this:
(reg-event-db
:update-foo-and-bar
(fn [db _]
(-> db
(assoc :foo 1)
(assoc :bar 2))))
Haven't heard of such project but I'd like to see a nice graph of the whole reactive side of re-frame too~ đź‘Ť
https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md#some-code
Shouldn’t there be at least %
in the :on-success
handler there?
not necessarily
you could just want to dispatch something without the return value
but often, yes, you would use the %
to include the return value in the dispatch
yeah, but this code suggests that the handler should put an async query result somewhere into db
good point
Also, my first thought before reading this article would be to write some kind of coeffect, say (query conn "select * from items")
that would expose query result to, say :load-items
event handler and make it so that the handler just moves the data from the coeffect to db. It’s somewhat the other way round than presented here.
I see that they mention this here: https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md#the-alternative-approach Do you maybe know of any good examples of the alternative approach?
Are you guys thinking of cutting a new release for the cljs 1.9.660 compiler warnings due to reagent? I see it's been addressed upstream
@mattly https://clojurians.slack.com/archives/C073DKH9P/p1498668950274812 this is part of https://github.com/Day8/re-frame-trace. It's still pretty green, but it dynamically discovers the relationships in your code as they run, showing you the current subscription tree