You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActiveREST catches errors that occur when a component is rendered that depends on data that is not yet available. It will then rerender that component when the data becomes available.
One problem with the current implementation is that ComponentDidMount will not be executed for any component that is rendered before its data is available. The first time, the render fails and ComponentDidMount isn't called; when activeREST rerenders the component after the data is available, ComponentDidUpdate is called instead.
This is pretty easy to workaround if you know it is happening. But it can be difficult to diagnose.
I recognize that ideally we wouldn't need to use ComponentDidMount events.
The text was updated successfully, but these errors were encountered:
tkriplean
changed the title
ComponentDidMount not triggered if component fails to render due to missing activerest data
ComponentDidMount never called if component fails to render due to missing activerest data
Sep 10, 2014
Hm. I can't see why componentDidMount is not being called. When render throws an error, the wrapper catches the error and returns a loading indicator. Then react should proceed to do a componentDidMount as usual.
I guess I can write up a test case for this in testmike.coffee to try to reproduce it and see what's happening.
ActiveREST catches errors that occur when a component is rendered that depends on data that is not yet available. It will then rerender that component when the data becomes available.
One problem with the current implementation is that ComponentDidMount will not be executed for any component that is rendered before its data is available. The first time, the render fails and ComponentDidMount isn't called; when activeREST rerenders the component after the data is available, ComponentDidUpdate is called instead.
This is pretty easy to workaround if you know it is happening. But it can be difficult to diagnose.
I recognize that ideally we wouldn't need to use ComponentDidMount events.
The text was updated successfully, but these errors were encountered: