ERROR-2:React
2015-11-25 14:57
465 查看
原文链接:https://www.geek-share.com/detail/2659380926.html
「版本」React0.142
「环境」chrome浏览器报错:
「信息」Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.
解决办法:
「原因」这个错误是在创建ReactDOM.render()时,放置的容器使用了document.body || document.getElementsByTagName('body')[0]等引起的错误,这样写会把第三方其他js给覆盖掉。
「解决」避免使用body作为容器,使用其他标签作为容器,即可解决。
转载于:https://www.geek-share.com/detail/2659380926.html
相关文章推荐
- react native Exception in thread "main" java.util.zip.ZipException: error in opening zip file
- [React Error]: Target container is not a DOM element
- ERROR-1:React
- react-native run-android 提示 java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlug
- react-native android 报错 error calling Appregistry.runApplication
- react-redux升级到7.0.x后报错"TypeError: Object(...) is not a function"
- windows平台react-native && android安装错误Error EPERM
- react-native 升级.Error: While resolving module react-native-vector-icons
- npm安装create-react-app出现“Error: EACCES: permission denied”的解决办法
- react-native运行样例报错:Error watching file for changes: EMFILE
- Gulp watch error Error: watch /home/react-mobile/stylus/ ENOSPC
- React Native多图层View,实现empty,content,error,loading等界面无缝跳转
- React Native iOS 之error babelrc.stage
- React创建项目报错 Error: EACCES: permission denied, open '/Users/****/.babel.json'
- React 文件夹访问权限问题 ,Error: EPERM: operation not permitted, unlink \'D:\\...'
- react native error
- [React/Error: Minified React error #130]
- 关于react-native出现SyntaxError /Users/mac/firstTest/index.ios.js: Unexpected token的问题
- Error:Configuration with name 'default' not found. 解决办法 (React Native项目)
- react0.45.0版本问题 An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):