Improve "Can only mount when umounted" message
Ben Alpert committed
Jan 13, 2014 at 13:26 UTC
2f027fce2d84d8d0c55252df53ca667d923961fb
1 file changed
+3
-1
src/core/ReactComponent.js
+3
-1
@@ -321,7 +321,9 @@ var ReactComponent = {
321
mountComponent: function(rootID, transaction, mountDepth) {
322
invariant(
323
!this.isMounted(),
324
- 'mountComponent(%s, ...): Can only mount an unmounted component.',
324
+ 'mountComponent(%s, ...): Can only mount an unmounted component. ' +
325
+ 'Make sure to avoid storing components between renders or reusing a ' +
326
+ 'single component instance in multiple places.',
327
rootID
328
);
329
var props = this.props;