This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-13
Channels
- # aws-lambda (7)
- # beginners (80)
- # boot (134)
- # cider (11)
- # cljs-dev (5)
- # cljsjs (3)
- # cljsrn (19)
- # clojure (144)
- # clojure-austin (2)
- # clojure-berlin (3)
- # clojure-greece (6)
- # clojure-italy (3)
- # clojure-russia (95)
- # clojure-spec (57)
- # clojure-uk (120)
- # clojure-za (2)
- # clojurescript (71)
- # component (1)
- # css (1)
- # cursive (22)
- # datascript (2)
- # datomic (101)
- # dirac (9)
- # docker (3)
- # emacs (10)
- # events (2)
- # immutant (3)
- # leiningen (2)
- # om (63)
- # om-next (1)
- # onyx (6)
- # pedestal (55)
- # portland-or (3)
- # protorepl (2)
- # re-frame (30)
- # reagent (10)
- # ring-swagger (1)
- # rum (31)
- # spacemacs (5)
- # specter (9)
- # untangled (90)
- # vim (46)
- # yada (2)
Can anyone tell me what the second argument to a query function is. The first is db, but the second is unclear. https://github.com/Day8/re-frame/blob/master/src/re_frame/subs.cljc#L149
Or the simple example https://github.com/Day8/re-frame/blob/master/src/re_frame/subs.cljc#L144
Is it a vector of the arguments passed into reg-sub? https://github.com/Day8/re-frame/blob/master/src/re_frame/subs.cljc#L202
I think I get it. It’s the query arguments, sent from the view.
@stuartrexking You have it correct. When you do this (subscribe [:some :thing 42])
the function registered by reg-sub
for :some
will get that entire 3-vector as the 2nd parameter
So you might have a subscription like (subscribe [:all-items-tagged "salacious"])
... within the handler you need to access the entire query vector so you can construct the right materialized view.
https://github.com/Day8/re-frame/issues/266 I’ve re-thought my stance on this.. really, if people need to work around it, a conditional statement and a polyfill will do the job.
hi, https://github.com/flexsurfer/re-frisk is coming on electron and react native, someone interested?
@superstructor thanks! that works
Is there any way of making the re-frame-tracer.core/tracer to print the duration of the fn call?
when building SPAs, is there a way to change the browser URL without causeing a page reload?
Should be able to do that with fragments:
->
@qqq previously you were asking about a use case for client side routing ... now you have one :)
@gadfly361 : indeed, if I had a time machine that let me talk to future-1-week me, I'd get so much done 🙂
Good evening. Can someone please tell me, if this is still a valid approach to showing chartist graphs: https://gist.github.com/edwthomas/08482a18a4aaf8655dc80f29f15beeef
I am using this and it works mostly fine, just when initialising my app and programatically dispatching the event that would normally be a user click on a navigation item, my graphs always end up empty and their view function does not get called when the data arrives.
If I understand things correctly, my question boils down to: How can I call the chartist draw method, which requires an element to draw on, after rendering the view?
@kishanov which seems to have a weird signature according to https://groups.google.com/forum/#!topic/clojurescript/5WWfXAf4EDI
:component-did-update
(fn [this]
(let [[_ arg1 arg2] (reagent/argv this)]
(re-frender-something arg1 arg2)))
this is how I generally use component-did-update: arg1
and arg2
would be positionally the same arguments that you pass to the definition of component via defn
Oh, it does get called, when the call to the view contains some arguments. Hang on, need to change some functions now. 🙂
https://gadfly361.github.io/gadfly-blog/2016-10-22-d3-in-reagent.html - I guess this is a good explanation of how it can be done in general with js libs that should be udpated when new props arrive