Skip to content

Commit 43d45bb

Browse files
committed
fix(ios): use parameterless updateState for RN < 0.82
1 parent 957b173 commit 43d45bb

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

ios/TrueSheetView.mm

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,11 @@ - (void)updateStateWithSize:(CGSize)size {
290290
stateData.containerWidth = static_cast<float>(size.width);
291291
stateData.containerHeight = static_cast<float>(size.height);
292292

293-
// RN 0.82+ processes state updates in the same layout pass (synchronous).
294-
// TODO: Once stable, we can drop native layout constraints in favor of synchronous Yoga layout.
295-
auto updateMode =
296293
#if REACT_NATIVE_VERSION_MINOR >= 82
297-
facebook::react::EventQueue::UpdateMode::unstable_Immediate;
294+
_state->updateState(std::move(stateData), facebook::react::EventQueue::UpdateMode::unstable_Immediate);
298295
#else
299-
facebook::react::EventQueue::UpdateMode::Asynchronous;
296+
_state->updateState(std::move(stateData));
300297
#endif
301-
302-
_state->updateState(std::move(stateData), updateMode);
303298
}
304299

305300
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {

0 commit comments

Comments
 (0)