Next.js Discord

Discord Forum

error boundary per component, how to?

Unanswered
American Chinchilla posted this in #help-forum
Open in Discord
American ChinchillaOP
do i need to install react-error-boundary lib to have an ErrorBoundary component in nextjs?

1 Reply

@American Chinchilla do i need to install `react-error-boundary` lib to have an ErrorBoundary component in nextjs?
do you have to? no, you can always [write your own](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary). but then you are essentially making your own react-error-boundary. so yeah, just install react-error-boundary.