N
N
Nikita2021-01-22 16:14:20
React
Nikita, 2021-01-22 16:14:20

Is there a way to catch fatal errors in React?

Let's say somewhere in an unexpected place we have undefined and the application breaks, in this case, in the dev assembly, an overlay will pop up with a description of the error, but is it possible to catch such fatal errors in the build assembly and instead display some page for user, a la "Something went wrong, please try again later".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hellcaster, 2021-01-22
@MiiZZo

Yes, it's called Error Boundaries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question