admin管理员组文章数量:1410688
I am upgrading from react
version 15
to 16
(16.6.1) and I am seeing this warning a bunch in the console, should I be worried?
Warning: Expected instance props to match memoized props before ponentDidUpdate. This is likely due to a bug in React. Please file an issue.
I can't really file an issue because I can't pinpoint it and it's not my code to share. I can't find anything online about this issue.
Should I be worried? Should I just let it slip?
I am upgrading from react
version 15
to 16
(16.6.1) and I am seeing this warning a bunch in the console, should I be worried?
Warning: Expected instance props to match memoized props before ponentDidUpdate. This is likely due to a bug in React. Please file an issue.
I can't really file an issue because I can't pinpoint it and it's not my code to share. I can't find anything online about this issue.
Should I be worried? Should I just let it slip?
Share Improve this question asked Nov 13, 2018 at 2:26 Adam ThompsonAdam Thompson 3,5264 gold badges28 silver badges46 bronze badges 2- Can you post some sample code? Or at least provide an example that triggers the same warning. – Matt Carlotta Commented Nov 13, 2018 at 2:56
- @mattcarlotta I can I can reproducing warning, see my ment on github issues – Roy Commented Nov 14, 2018 at 14:43
2 Answers
Reset to default 5Looking at a reproducing case in this issue report, this happens because a particular library (in that example, react-css-modules
) overwrites the this.props
object in your React ponent.
This has never been supported and can lead to other issues. If you must rely on this, a possible workaround is described here.
it took me days to solved. The issue was this.state was my local variable ref for address field.
ref={ref => (this.state = ref)} // error line
本文标签: javascriptExpected instance props to match memoized props in React 16Stack Overflow
版权声明:本文标题:javascript - Expected instance props to match memoized props in React 16 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745022940a2638237.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论