Merge pull request #878 from spicyj/mount-unmounted

Improve "Can only mount when umounted" message
This commit is contained in:
Pete Hunt
2014-01-13 14:38:07 -08:00

View File

@@ -321,7 +321,9 @@ var ReactComponent = {
mountComponent: function(rootID, transaction, mountDepth) {
invariant(
!this.isMounted(),
'mountComponent(%s, ...): Can only mount an unmounted component.',
'mountComponent(%s, ...): Can only mount an unmounted component. ' +
'Make sure to avoid storing components between renders or reusing a ' +
'single component instance in multiple places.',
rootID
);
var props = this.props;