This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-20
Channels
- # admin-announcements (1)
- # beginners (17)
- # boot (22)
- # cider (43)
- # cljs-dev (6)
- # cljsjs (2)
- # clojure (29)
- # clojure-austin (7)
- # clojure-estonia (1)
- # clojure-russia (62)
- # clojure-sg (1)
- # clojurebridge (2)
- # clojured (1)
- # clojurescript (89)
- # datomic (8)
- # hoplon (333)
- # jobs (3)
- # ldnclj (2)
- # leiningen (10)
- # luminus (1)
- # off-topic (9)
- # om (46)
- # proton (4)
- # re-frame (13)
- # reagent (29)
- # yada (11)
@mikethompson: still not working for me after following the examples. Here's a gist: https://gist.github.com/kanwei/7ac7efc9d966a2416c67
@kanwei: which version of reagent are you using?
Certainly of odd because many have used it (not me personally) .
What happens if you remove devcards from the equation?
Also, I'd write outer-test
like this:
(defn outer-test []
(let [t (subscribe [:timer])]
(fn [] ;; <----- added to make it From2
[:div
[:div (str @t)]
[inner-test @t]]
)))
I hacked it by using
(second (reagent/argv cmp))
in :component-did-mount
but it feels dirtyit's definitely getting passed into :component-will-receive-props though, but reagent/props just never returns anything
The Form2 suggestion wasn't about fixing the reagent/props
issue, it was about reminding you to not do subscriptions in Form1
I'm afraid I don't currently use reagent/props
so I'm stuck in terms of helping more.
I'm really puzzled though. I'd suggest raising an issue across at the reagent issue tracker. We'll see what other say there.
i've been experiencing performance problems with this little demo for a while: http://jrheard.com/mortgage/
i'd originally written my code incorrectly, such that i had a component function called draw-bar
and had invocations of it look like [draw-bar mortgage selected-mortgage something]
; and so whenever the app's selected mortgage changed, every single bar would redraw, because selected-mortgage
was different, which makes sense
so changing it to look like [draw-bar mortgage is-selected-mortgage etc]
made the app correctly only rerender the necessary bars whenever the selected mortgage (controlled by mousing over a bar) had changed
the source for this is at https://github.com/jrheard/mortgage/blob/master/src/mortgage/core.cljs btw
but so in unminified mode, i was still experiencing very bad performance problems - if you scrolled over a bunch of bars, the UI would lag behind the user's input very noticeably
it's less noticeable in minified mode, but still takes about 60ms whenever you mouse over a bar
i'm a rookie at using the chrome timeline tool, but i have some screenshots that maybe someone will know how to interpret
here's what a single mouse-over-a-bar event looks like from the unminified version: https://www.evernote.com/shard/s11/sh/dd5958c8-a38a-414e-8f63-6632820094a3/a696fda3187fec27
there are a ton of other function calls i couldn't also show on the screen, but it appears to bottom out in reagent's batching.cljs, in an absolute ton of Minor GC events in an "Animation Frame Fired"
you can see at the top of that screenshot that this is responsible for like 90% of the interaction's 108ms rendering time (if i'm interpreting all this correctly)
here's a screenshot of the minified version (which is currently the live one i linked earlier) - https://www.evernote.com/shard/s11/sh/14085ab6-ec40-41c7-a80c-b52217822993/c301e06670e28fef
rendering just takes 63ms this time, but still there' sa lot of time spent in Animation Frame Fired, and still a noticeable amount of Minor GC events