score:17

Accepted answer

you're creating a new component class inside the render function.

part of react's diffing algorithm looks at the components, and if it sees you rendered a different type component in one spot it says "the structure is probably significantly different, so i won't waste time diffing the children". it throws out the node, and renders the new result to the dom.

move var filter = react.createclass... somewhere it's only executed once, and it'll work fine.


Related Query

More Query from same tag