mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Summary: As a comment above changed lines states, RootShadowNode is a special one because it layouts itself. In normal case some parent node layouts its children, and it also checks getHasNewLayout flag. So, in the case of RootShadowNode it has to check its own flag by itself. That fix should save some resources and generally correct. After the change, changing a state of some node does not cause relayout process. If dirtying is required, the component should call `dirtyLayout()` explicitly in the constructor or in `adopt` method. Reviewed By: JoshuaGross Differential Revision: D14472751 fbshipit-source-id: 75bf62ac28991a39e5664aa71c08bd0e64fa275b