Add config version, and invalidate layout on config change (#1674)

Summary:
X-link: https://github.com/facebook/react-native/pull/45259

This is a continuation of the previous PR: https://github.com/facebook/react-native/pull/45047

I made the change more generic for allowing any kind of config change to invalidate layout.

Changelog: [Internal]

Pull Request resolved: https://github.com/facebook/yoga/pull/1674

Reviewed By: rozele

Differential Revision: D59286992

Pulled By: NickGerleman

fbshipit-source-id: f46f35b03d5d9a743b798844ee3e1a02c271ccde
This commit is contained in:
Andrew Coates
2024-07-03 12:46:18 -07:00
committed by Facebook GitHub Bot
parent a1e9abb9b3
commit e4fe14ab3e
7 changed files with 212 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ bool LayoutResults::operator==(LayoutResults layout) const {
direction() == layout.direction() &&
hadOverflow() == layout.hadOverflow() &&
lastOwnerDirection == layout.lastOwnerDirection &&
configVersion == layout.configVersion &&
nextCachedMeasurementsIndex == layout.nextCachedMeasurementsIndex &&
cachedLayout == layout.cachedLayout &&
computedFlexBasis == layout.computedFlexBasis;