[英]Children don't re-render when parent component is optimised
I am seeing something that looks like a bug and have written a simple test case for it. 我看到的东西看起来像一个bug,并为它编写了一个简单的测试用例。
Please refer to this WebpackBin as it contains the test scenario: http://www.webpackbin.com/EJpabsuJW 请参阅此WebpackBin,因为它包含测试场景: http : //www.webpackbin.com/EJpabsuJW
This is expected behaviour. 这是预期的行为。
children
is a prop
and by not checking it in shouldComponentUpdate
you are saying that you component update shouldn't depend on it children
是一个prop
并且不在shouldComponentUpdate
检查它,你说组件更新不应该依赖它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.