Archive

Archive for the ‘javascript’ Category

React Error Handling And Reporting With Error Boundary And Sentry

November 18, 2023 Leave a comment

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

June 18, 2022 Leave a comment

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.

Source:
https://stackoverflow.com/questions/45367298/could-not-proxy-request-pusher-auth-from-localhost3000-to-http-localhost500

Categories: javascript Tags: , ,

Arrow functions explained

June 19, 2019 Leave a comment

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

Categories: javascript