Improve error message for components in bad states (missing instance) (#6990)

(cherry picked from commit 7988acaa95)
This commit is contained in:
Timothy Yung authored and Paul O’Shannessy committed 2016-06-14 15:50:38 -07:00
1 parent e974383cba
commit 6eeb2898f7
1 file changed
+7
@@ -741,6 +741,13 @@ var ReactCompositeComponentMixin = {
nextUnmaskedContext
) {
var inst = this._instance;
invariant(
inst != null,
'Attempted to update component `%s` that has already been unmounted ' +
'(or failed to mount).',
this.getName() || 'ReactCompositeComponent'
);
var willReceive = false;
var nextContext;
var nextProps;