We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前 taro 为了避免在 React 16 中因没有捕获异常导致页面挂掉在 runtime 的实现中定义了 componentDidCatch,而这个函数中并没有判断原始模块中是否已经包含了 componentDidCatch,这导致开发者想自己捕获异常后做一些事情(如错误统计、预警)变得很麻烦。 希望在该函数中加入对原始模块 componentDidCatch 的判断。
直接在页面模块中使用 componentDidCatch 捕获异常。
The text was updated successfully, but these errors were encountered:
Taro 自动设置错误边界,觉得这样很好。 但是,是否可以让开发者能够关闭自动设置的错误边界,比如通过编译配置来关闭? 目前在做全局的错误监控,也遇到这个问题。 通过 HOC 的方式实现的话,对每个页面的代码有侵入性,提高了业务代码的接入成本。 如果能只需在app级别实现一个componentDidCatch就可以捕获全局错误的话,接入成本能低一些。
Sorry, something went wrong.
No branches or pull requests
这个特性解决了什么问题?
目前 taro 为了避免在 React 16 中因没有捕获异常导致页面挂掉在 runtime 的实现中定义了 componentDidCatch,而这个函数中并没有判断原始模块中是否已经包含了 componentDidCatch,这导致开发者想自己捕获异常后做一些事情(如错误统计、预警)变得很麻烦。
希望在该函数中加入对原始模块 componentDidCatch 的判断。
这个 API 长什么样?
直接在页面模块中使用 componentDidCatch 捕获异常。
The text was updated successfully, but these errors were encountered: