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

This commit is contained in:
Timothy Yung
2016-06-07 17:23:40 -07:00
parent 1abce1630c
commit 7988acaa95
@@ -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;