I'm using React 16.3 which has support for error boundaries, via ComponentDidCatch() function overrides. I'm using typescript as well.
For ease of future debugging I want to somehow catch any errors/exceptions at the component level in order to highlight (draw yellow square) in the UI indicating the possition of broken component.
How could I do this without having to explicitly declare error boundary around every single component that I use?
Perhaps its possible to wrap them during build time? I also presume error boundary would need to somehow get the props from broken component in order to know where to draw yellow square. How could I accomplish that?
I'm quite new to React so thanks in advance.