-
chevron_right
How to handle errors in ReactJS
pubsub.slavino.sk / infoworldcom · Thursday, 28 January, 2021 - 11:00 edit
Graceful error handling is an essential element of well designed software. This is true of front-end JavaScript user interfaces, and ReactJS provides specialized error handling for dealing with render-time errors. This article offers an overview for dealing with errors in ReactJS applications.
[ Also on InfoWorld: How to use React functional components ]
We can divide errors broadly into two types, and error handling into two aspects.
The two error types:
- JavaScript errors
- Render errors
JavaScript errors are those which occur in the code and can be handled with standard try/catch blocks, while render errors occur in the view templates and are handled by React error boundaries.
To read this article in full, please click here
Značky: #JavaScript, #Angular, #React, #Rozne