-
Notifications
You must be signed in to change notification settings - Fork 113
setState warning and too many getMeteorState calls #84
Comments
This is driven by TestList rendering twice: once for change in props and again when I don't think
Getting rid of the afterFlush() around I will make a pull request with the above. Also, the find in TestList should have a |
@mikowals WOW, thank you very much for your helpful input. |
I'm encountering exactly the same problem. Would you be able to share exactly how you fixed it? |
What I did was add |
Hi,
See repro here: https://github.com/froatsnook/meteor-react-set-state-warning
I'm seeing a ton of these:
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.
Basically I have:
where
<Test />
is:Every time
query
changes inTestList
,getMeteorState
gets called in eachTest
, even though the Test itself doesn't change..EDIT: OK, so implementing
shouldComponentUpdate
removes the warning. But is it necessary thatgetMeteorState
be called? Intuitively it doesn't seem necessary, but maybe I don't understand this well enough.The text was updated successfully, but these errors were encountered: