问题:
我用的版本是
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.2",
"react-native-cli": "^2.0.1",
"react-navigation": "^1.5.11"
},
我解决不了,求助
问题讨论:
1)https://github.com/react-navigation/react-navigation/issues/3956
2)https://github.com/moreartyjs/moreartyjs/issues/84
3)https://github.com/facebook/react/issues/3417
4)https://github.com/sagansystems/moreartyjs/pull/3
5)https://github.com/moreartyjs/moreartyjs/pull/108
6)https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
相关资料:
我认为:
竟然在react文档中已经对isMounted()进行说明不适用于ES6类,提供了一个用例,但不会显式地将其称为弃用。
是不是在react-navigation中竟然就用到了ES6而用了isMounted(),那就报错了。
解决:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader']);//忽略警告