If there is an error thrown in a child render method under provide then componentDidMount won't fire before componentWillUnmount, causing this.unsubscribe to be undefined.
When componentWillUnmount is called to unmount the partial tree this.unsubscribe is called, resulting in TypeError: this.unsubscribe is not a function at StatefulComponent.componentWillUnmount. This masks the actual error being thrown in the child render method, making it difficult to debug in development.
If there is an error thrown in a child render method under
provide
thencomponentDidMount
won't fire beforecomponentWillUnmount
, causingthis.unsubscribe
to be undefined.When
componentWillUnmount
is called to unmount the partial treethis.unsubscribe
is called, resulting inTypeError: this.unsubscribe is not a function at StatefulComponent.componentWillUnmount
. This masks the actual error being thrown in the child render method, making it difficult to debug in development.