Skip to content

Conversation

@kligarski
Copy link
Contributor

@kligarski kligarski commented Oct 23, 2025

Description

Adds support for synchronous state updates for SafeAreaView on iOS for RN 0.82+.

before after
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-10-23.at.14.44.03.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-10-23.at.14.48.57.mov

Changes

  • add immediate flag to updateState

Test code and steps to reproduce

Run TestBottomTabs. Switch between Tab1 and Tab2.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kligarski kligarski requested a review from kkafar October 23, 2025 12:57
Copy link
Contributor

@t0maboro t0maboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Do we want to have it enabled by default since 82, or follow the same approach with FF per component as I did here: #3282 ?

@kligarski
Copy link
Contributor Author

Q: Do we want to have it enabled by default since 82, or follow the same approach with FF per component as I did here: #3282?

cc @kkafar

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t0maboro, @kligarski
Here I'm fine with having this enabled by default, because SafeAreaView is an "experimental" component. Stack v4 isn't.

Let's go with this approach. Thank you!

#import "RNSSafeAreaViewNotifications.h"

#if RCT_NEW_ARCH_ENABLED
#include <cxxreact/ReactNativeVersion.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header exists since 0.79 (link), so we should be fine here.

@kligarski kligarski merged commit a15960d into main Oct 29, 2025
6 checks passed
@kligarski kligarski deleted the @kligarski/ios-safe-area-view-sync-state-update branch October 29, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants