This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-27
Channels
- # admin-announcements (1)
- # aleph (3)
- # beginners (72)
- # boot (67)
- # braveandtrue (1)
- # cider (17)
- # cljs-dev (8)
- # cljsfiddle (2)
- # cljsjs (1)
- # cljsrn (2)
- # clojure (19)
- # clojure-greece (1)
- # clojure-russia (42)
- # clojurescript (15)
- # core-logic (10)
- # cursive (6)
- # datomic (2)
- # hoplon (349)
- # kosmos (3)
- # lein-figwheel (3)
- # om (52)
- # onyx (3)
- # overtone (1)
- # parinfer (11)
- # proton (11)
- # protorepl (3)
- # reagent (29)
- # ring-swagger (2)
- # spacemacs (1)
- # testing (3)
- # uncomplicate (1)
@afhammad, looks like you can hack together your own refs, as in this test example: https://github.com/reagent-project/reagent/blob/6e8a73cba3a0fb13d3cf6dc38168e889bef9d337/test/reagenttest/testreagent.cljs#L941
hey are there any reagent components that can be used to render code on the browser? specifically clojurescript?
I'm working on a library called respo(and respo-client for the DOM part) which is very like reagent and deku, but much simplified for the purpose of experimenting. Currently I finished making a demo with Respo called https://github.com/Memkits/wanderlist . Talk to me here if you are interested https://gitter.im/mvc-works/respo
Is there any known problem or drawback with generating React :key
s with gensym
? For example [:li {:key (gensym "item_")} ...]
The keys help with performace. My understanding is if you have a list of keyed items, then the list will only re-render the keyed items that have changed (instead of all of them). I think gensym wouldn't allow react to accurately check keys between renders, which may result in a rerender of the entire list each time.
@mmeix: Surely there must be some kind of primary key for the models underlying your list items?
Even if it’s a gensym, you should associate it with the model so it’s consistent each render.
I think gensym would create an id of item_X on the first render and item_Y on the second render, so react will always update the list item bc it will think its new
@gadfly361: Right, hence my point about setting the gensym onto a primary-key field on the model.