React Uncaught Invariant Violation: ReactMount: Two valid but unequal nodes with
2016-05-11 17:50
651 查看
报错提示:
invariant.js:39 Uncaught Invariant Violation: ReactMount: Two valid but unequal nodes with the same `data-reactid`: .0.2.4.0.$117405.0
报错原因:
由于你的React代码包含了双重点击事件或者,A标签里面嵌套了A标签或onClick事件
<a> <div></div> <a>来点击吧</a> </a>
报错代码:
<Link to={`/reply-thread/`}> ...... <Thumb onClick={function()} /> </Link>
解决方案:
移除级联引起冒泡事件的函数。
有疑问或技术交流,扫描公众号一起讨论学习。
更多React在线学习访问:http://each.sinaapp.com/react/index.html
阅读更多
相关文章推荐
- react.js:20157 Uncaught Invariant Violation: _registerComponent(...): Target container is not a DOM
- React-Native坑1:Invariant Violation:Application 项目名 has not been registered.
- 解决React-Native-Attached-DialogModule-to-host-with-pending-alert-but-no-FragmentManager
- Nodes “-1” are listed in ADOP_VALID_NODES table but not in FND_NODES table
- U面经Prepare: Print Binary Tree With No Two Nodes Share The Same Column
- [PReact] Reduce the Size of a React App in Two Lines with preact-compat
- Resource interpreted as Stylesheet but transferred with MIME type text/html:以及Uncaught SyntaxError:
- Copy List with Random Pointer & Add Two Numbers & Valid Palindrome
- 【iOS】Swift3:执行save()的时候出现:Call can throw, but it is not marked with 'try' and the error is not handl
- leetcode 159: Longest Substring with At Most Two Distinct Characters
- retrying with upper case share name mount error 6 = No such device or address
- The base class includes the field '...', but its type (...) is not compatible with the type of control (...)
- [Webpack 2] Optimize React size and performance with Webpack production plugins
- Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in databas
- A schema cannot contains two global components with the same name
- The currently selected variant "arm-debug" uses split APKs, but none of the 1 split apks are compatible with the current device with density "213" and ABIs "x86".
- 警告:Resource interpreted as Stylesheet but transferred with MIME type application/x-css
- [leetcode] 159. Longest Substring with At Most Two Distinct Characters 解题报告
- Customizing TreeNodes with RenderPreText and RenderPostText
- VirtualBox "/sbin/mount.vboxsf: mounting failed with the error: Invalid argument"解决办法