mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Fix initial width measurement of AndroidTextInput. The lifecycle here between measure and layout is a little wacky. I put this in comments too, but: 1. Measure is called first. It's marked as const so it can't call updateStateIfNeeded. 2. Layout is called immediately after. It's not const so it calls updateStateIfNeeded. 3. The state is updated, but it's not part of a commit, it just mutates the node in-place. 4. If the node isn't dirtied again, measure won't be called again. For completeness: I did try calling `dirtyLayout` in the `layout` method. That does not work. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D19549803 fbshipit-source-id: f3798e10dca2edacb364cc5b53f58f091de5e4d0