Files
react-native/ReactAndroid
Joshua Gross 1afd9f0e31 UpdateState MountItems should *always* update ViewManagers
Summary:
I'm removing an ill-informed "optimization" that resulted in some StateUpdates being dropped. For some components (including TextInput) we rely on State updates to request a layout from the ShadowNode layer.

In the past we were performing an optimization that didn't update the View layer if the data contained in the State container is identical, but in the case of TextInput and other components, we simply pass an opaque
object with no meaningful data to trigger the layouts. In those cases, it could cause a permanent rift between the View layer's StateWrapper and the most recent state object from the C++ perspective.

In the case of TextInput this didn't cause tangible bugs because you can always update state using an out-of-date State object, but it's better this way anyway.

The other issue is that for some components, we want to know when there's a State update from the Cxx layer. This optimization broke certain logic in those components.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23306222

fbshipit-source-id: 8ef83149b814de50776674b5fd22406be1db14ba
2020-08-24 19:39:56 -07:00
..
2019-10-16 10:06:33 -07:00

Building React Native for Android

See the docs on the website.

Running tests

When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.