This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-24
Channels
- # admin-announcements (17)
- # alda (5)
- # aws (4)
- # beginners (19)
- # boot (80)
- # bristol-clojurians (3)
- # cider (15)
- # clojure (257)
- # clojure-berlin (1)
- # clojure-czech (1)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (77)
- # clojurescript (186)
- # core-async (7)
- # core-typed (6)
- # cursive (8)
- # datomic (2)
- # devcards (2)
- # editors (45)
- # emacs (23)
- # hoplon (83)
- # jobs (1)
- # ldnclj (106)
- # leiningen (43)
- # off-topic (4)
- # onyx (31)
- # reagent (10)
- # yada (1)
@colin.yates: what’s the bug there?
Hi @tel - the problem is that the outer fn is called only once therefore the subscription is called only once. If the data you pass in changes then the subscription doesn’t. For example, if I have a subscription which inc
s the provided parameter and I call [my-cmp 1]
. If I subsequently call [my-cmp 2]
then I won’t get a new subscription and nothing will change. That’s the effect I am seeing anyway
Does reagent or react fiddle with the meta key in a way that if in the first run I create an element outside of a for loop with a certain key, it's not the same when in the next run I create the element in a for loop with the same key?
The use case is that I have an empty input field, and as soon as something is typed into it a new one appears next to it. What happens is that the cursor moves to the new field, and data-reactid of the field from the two runs is different, even though the key is the same.