ErrorCatch_React

Solution to the whole page crash caused by the exception of React sub component

doc

react-catchable

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

GitHub

View Github