Skip to content

Conversation

@WesSouza
Copy link

@WesSouza WesSouza commented Jun 1, 2017

On _handleDoneLeaving, prevent calling setState if the component is unmounted.

This was triggering this error:

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. Please check the code for the TransitionGroup component.

This happened on a very complex structure and I was not able to reproduce it with sample code.

It is related to #15.

On `_handleDoneLeaving`, prevent calling `setState` if the component is unmounted.

This was triggering this error:

> 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. Please check the code for the ReactTransitionGroup component.
// This entered again before it fully left. Add it again.
_this.performEnter(key);
} else {
} else if (component) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this component isn't the TransitionGroup instance. The error would be related to TransitionGroup not being mounted when setState is called, it'd be better to check if the current component is mounted

@jquense jquense closed this Jul 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants