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