Haven't wrapped it around any components yet, but I might do so in the near future.
This component will be helpful for debugging and preventing the entire app from crashing.
/*
This error boundery class component works similar to
a try - catch block in javascript.
Wrap this component around another component like so
<ErrorBoundary>
<YourComponent />
</ErrorBoundary>
This will prevent the entire app from crashing if there is an error in the <YourComponent />
However the <YourComponent /> will no longer render and instead the render function of this component will render instead.
*/
Added the error boundary class component from https://reactjs.org/docs/error-boundaries.html
Haven't wrapped it around any components yet, but I might do so in the near future. This component will be helpful for debugging and preventing the entire app from crashing.