React Error Handling And Reporting With Error Boundary And Sentry
In this article, we’ll look at error boundaries in React. We’ll learn what they are and how to use them to deliver a better user experience, even when something breaks in our app. We’ll also learn how to integrate with Sentry for realtime error monitoring.
Source:
https://www.smashingmagazine.com/2020/06/react-error-handling-reporting-error-boundary-sentry
React – Proxy error: Could not proxy request
Problem:
I was getting the following error
“Proxy error: Could not proxy request See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).”
Solution:
Change in package.json
"proxy": "http://localhost:5000"
To
"proxy": "http://127.0.0.1:5000"
No idea why this works. When I do a curl on localhost:5000 I get back a response. SMH. This was working previously with node version 16, but not anymore with node version 18.
Arrow functions explained
An arrow function expression is a syntactically compact alternative to a regular function expression, although without its own bindings to the this, arguments, super, or new.target keywords. Arrow function expressions are ill suited as methods, and they cannot be used as constructors.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions