DEV Community

Discussion on: Handling Errors in Vue.js

Collapse
 
herrbertling profile image
Markus Siering

I think (and am not sure as well 😄) you can compare errorCaptured to React’s error boundaries (=> reactjs.org/docs/error-boundaries....).

So you’d also use them in Vue to capture errors and (through returning false) confine the error to a certain component nesting level. Could be very helpful to shield e.g. network requests within a part of your app from crashing the whole thing… I think 🤔

Collapse
 
raymondcamden profile image
Raymond Camden

Interesting. I don't know React and I keep thinking I need to make the time to get to know it better.

Collapse
 
herrbertling profile image
Markus Siering

Have worked with it before switching jobs and thus starting with Vue. I like Vue way more regarding ease of use. I think it helps to become familiar with React’s basic ideas. A lot is similar to Vue and some things are “further out there” like Suspense and all that fancy stuff 😄