mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6530c90267
Summary: We don't know why exactly it happens but (seemingly) sometime Paragraph component receives an empty State object. This causes a crash because of unchecked access to an instance variable. This diff introduces an assert in DEBUG mode and the check for prod. Why is this happens? Hard to say, probably `layout()` method (which updates `State`) is not being called on ShadowNode. Why? One explanation can be that Yoga skips some subtree during layout because it starts from "visibility: hidden" component. We need to investigate it more and figure out what exactly going on and what should we need to improve besides the check. That's why we have an assertion. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D20260512 fbshipit-source-id: 4772855f41c6694be2ed6c0a19da40332d2bb8db