In the past, JavaScript errors inside components used to corrupt React’s internal state and cause it to emit cryptic errors on next renders. These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them gracefully in components, and could not recover from them.
Source: https://reactjs.org/docs/error-boundaries.html
Mayu needs error boundaries for the same reason.