摘要: React 16 提供一个内置函数 componentDidCatch,如果 render() 函数抛出错误,则会触发该函数。 举个例子 class ErrorBoundary extends React.Component { constructor(props) { super(props); 阅读全文
posted @ 2020-12-21 09:12 axl234 阅读(300) 评论(0) 推荐(0) 编辑