V
V
vaskadogana2019-04-09 14:30:38
React
vaskadogana, 2019-04-09 14:30:38

How can I make sure that only a specific component crashes, and not the entire application?

Recently updated webpack and react version. Now if one of the components has a critical error, everything crashes. Previously, in the case of a bug, only the component with the bug did not work, but now everything breaks, it looks something like this 42447-clip-154kb.jpg?nocache=1.
ps application clientSide

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nick, 2019-04-09
@vaskadogana

In general, errors should be corrected, but you can look in the direction of componentDidCatch

R
Robur, 2019-04-09
@Robur

In your screenshot in the console there is an error message, it contains the answer to your question and a link where to read

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question