Replace wrapRender with componentDidThrow
nchevobbe opened this issue · comments
wrapRender
was introduced to prevent crashing a panel when a component was throwing an exception.
In React 16 there's a new lifecycle function which does exactly this: componentDidThrow
.
In order to use it, we have to turn Rep
from a function to a React component so it has access to the lifecycle method.
We'll have to check that this does not harm performances in the console.
This issue was moved to firefox-devtools/debugger#6111
This issue was moved to firefox-devtools/debugger#6113