Check the newest version document, which is v19. https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary