Whenever an error occurs resolving a component this.state.error = true,
however handling the error happens too late. As a result in an environment
where typeof window !== 'undefined' i.e. the browser, this results in an
infinite render loop.
This PR hoists the error handling earlier in the render call.
Whenever an error occurs resolving a component
this.state.error = true
, however handling the error happens too late. As a result in an environment wheretypeof window !== 'undefined'
i.e. the browser, this results in an infiniterender
loop.This PR hoists the error handling earlier in the
render
call.Fixes #42