Question:
I am working with a functional component in which I implemented Lazy loading and compoent is lazy loading fine. But in a sanario while there is no component ErrorBoundary is not working and app is breaking with no fallback UI/msg. My code isAnswer:
Try setting yourhasError
state to true
in the componentDidCatch
method.If you have better answer, please add a comment about this, thank you!