Solution to the whole page crash caused by the exception of React sub component
use npm
npm i react-catchable
use yarn
yarn add react-catchable
import catchable from "react-catchable";
class XXXComponent extends React.Component{
render(){
return <div></div>
}
}
export default catchable(XXXComponent);
Demo source:click