Fork me on GitHub

@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 incs 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


that makes sense


and is indeed a subtle bug


or potential bug 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.


Correction: currently the field loses focus, so the cursor is nowhere after entering the first character in the input.


Indeed if I munge the code such that all elements originate from (for), it works.