I'd also mention for those starting with React 16, why the error boundaries component needs to be a class instead of a stateless functional component. componentDidCatch is a life cycle method and life cycle methods are currently only supported in class components.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd also mention for those starting with React 16, why the error boundaries component needs to be a class instead of a stateless functional component.
componentDidCatchis a life cycle method and life cycle methods are currently only supported in class components.