Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
78929bd
feat: add new hook shadowTreeDidCommit
paradowstack Jul 13, 2026
f430d40
feat: shadowTreeDidCommit cxx api
paradowstack Jul 28, 2026
93d5d7d
feat: implement LayoutEventEmitter for onLayout events
paradowstack Jul 15, 2026
c2dbd04
feat: LayoutEventEmitter cxx api
paradowstack Jul 28, 2026
78116de
feat: add enableResizeObserverByDefault feature flag
paradowstack Jul 13, 2026
5e095cc
feat: ResizeObserver stub implementation
paradowstack Jul 13, 2026
1a05412
feat: JS Web API stubs
paradowstack Jul 13, 2026
362000b
feat: ResizeObserver TurboModule
paradowstack Jul 13, 2026
9e2b7dc
feat: add polyfill behind feature flag
paradowstack Jul 13, 2026
366e581
feat: add basic implementation
paradowstack Jul 14, 2026
037ec5a
feat: devicePixelContentBoxSize support
paradowstack Jul 14, 2026
3cbec14
feat: broadcast on rendering
paradowstack Jul 14, 2026
38b01b4
fix: handle re-observe
paradowstack Jul 15, 2026
225b60c
fix: initial load + hidden cases
paradowstack Jul 15, 2026
502cea3
fix: unobserve after target unmount
paradowstack Jul 23, 2026
bff1494
fix: improve unobserve logic
paradowstack Jul 23, 2026
23f64bc
fix: round device-pixel-content-box dimensions
paradowstack Jul 23, 2026
7bf5f85
fix: frozing ResizeObserverEntry getters
paradowstack Jul 23, 2026
41730a7
refactor: simplify runResizeObservations method signature
paradowstack Jul 23, 2026
3afaeae
feat: add observation sequence to ResizeObserver for ordered delivery
paradowstack Jul 24, 2026
2df8f1e
feat: handle unmount 0x0 case
paradowstack Jul 27, 2026
d0ca228
feat: add ResizeObserver Fantom tests
paradowstack Jul 27, 2026
2bde364
fix: expose public wrapper
paradowstack Jul 27, 2026
885847d
feat: update bom file
paradowstack Jul 27, 2026
a698737
feat: add docs
paradowstack Jul 28, 2026
a99370e
feat: rn-tester showcase page
paradowstack Jul 28, 2026
4b9b677
feat: add ResizeObserver globals test setup
paradowstack Jul 28, 2026
e8b159a
feat: update RuntimeScheduler docs
paradowstack Jul 28, 2026
5add448
feat: more test cases
paradowstack Jul 28, 2026
c86a985
feat: add surfaceIdsWithPendingInitialDelivery_
paradowstack Jul 28, 2026
7c4f76e
feat: new tests
paradowstack Jul 28, 2026
453bd73
feat: split into three examples
paradowstack Jul 28, 2026
e361dc4
fix: flow-check changes
paradowstack Jul 28, 2026
6cf470d
refactor: cleanup
paradowstack Jul 28, 2026
fc9adaf
refactor: prettier
paradowstack Jul 28, 2026
97574f8
feat: ResizeObserver cxx api
paradowstack Jul 28, 2026
0a1cb3b
fix: import order
paradowstack Jul 28, 2026
027b820
fix: add missing Package.swift targets
paradowstack Jul 29, 2026
bc50446
fix: add missing dependency
paradowstack Jul 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/react-native/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ let reactMutationObserverNativeModule = RNTarget(
dependencies: [.reactNativeDependencies, .reactCxxReact, .reactFabric, .reactTurboModuleBridging, .reactTurboModuleCore, .yoga]
)

/// React-resizeobservernativemodule.podspec
let reactResizeObserverNativeModule = RNTarget(
name: .reactResizeObserverNativeModule,
path: "ReactCommon/react/nativemodule/resizeobserver",
dependencies: [.reactNativeDependencies, .reactCxxReact, .reactFabric, .reactTurboModuleBridging, .reactTurboModuleCore, .reactGraphics, .reactGraphicsApple, .reactRuntimeScheduler, .yoga]
)

/// React-viewtransitionnativemodule.podspec
let reactViewTransitionNativeModule = RNTarget(
name: .reactViewTransitionNativeModule,
Expand Down Expand Up @@ -476,7 +483,7 @@ let reactFabric = RNTarget(
"scheduler/tests",
],
dependencies: [.reactNativeDependencies, .reactJsiExecutor, .rctTypesafety, .reactTurboModuleCore, .jsi, .logger, .reactDebug, .reactFeatureFlags, .reactUtils, .reactRuntimeScheduler, .reactCxxReact, .reactRendererDebug, .reactGraphics, .yoga, .reactJsInspectorTracing],
sources: ["animated", "animationbackend", "animations", "attributedstring", "core", "componentregistry", "componentregistry/native", "components/root", "components/view", "components/view/platform/cxx", "components/scrollview", "components/scrollview/platform/cxx", "components/scrollview/platform/ios", "components/legacyviewmanagerinterop", "components/legacyviewmanagerinterop/platform/ios", "dom", "scheduler", "mounting", "observers/events", "observers/intersection", "observers/mutation", "telemetry", "consistency", "leakchecker", "uimanager", "uimanager/consistency", "viewtransition"]
sources: ["animated", "animationbackend", "animations", "attributedstring", "core", "componentregistry", "componentregistry/native", "components/root", "components/view", "components/view/platform/cxx", "components/scrollview", "components/scrollview/platform/cxx", "components/scrollview/platform/ios", "components/legacyviewmanagerinterop", "components/legacyviewmanagerinterop/platform/ios", "dom", "scheduler", "mounting", "observers/events", "observers/intersection", "observers/mutation", "observers/resize", "telemetry", "consistency", "leakchecker", "uimanager", "uimanager/consistency", "viewtransition"]
)

let reactFabricInputAccessory = RNTarget(
Expand Down Expand Up @@ -720,6 +727,7 @@ let targets = [
reactWebPerformanceNativeModule,
reactIntersectionObserverNativeModule,
reactMutationObserverNativeModule,
reactResizeObserverNativeModule,
reactViewTransitionNativeModule,
reactFeatureflagsNativemodule,
reactNativeModuleDom,
Expand Down Expand Up @@ -912,6 +920,7 @@ extension String {
static let reactWebPerformanceNativeModule = "React-webperformancenativemodule"
static let reactIntersectionObserverNativeModule = "React-intersectionobservernativemodule"
static let reactMutationObserverNativeModule = "React-mutationobservernativemodule"
static let reactResizeObserverNativeModule = "React-resizeobservernativemodule"
static let reactViewTransitionNativeModule = "React-viewtransitionnativemodule"
static let reactFeatureflagsNativemodule = "React-featureflagsnativemodule"
static let reactNativeModuleDom = "React-domnativemodule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2544e292c44dabe82ad82a9b08a08f08>>
* @generated SignedSource<<3427e6c4c4fcd8b7039abab75de7c09f>>
*/

/**
Expand Down Expand Up @@ -282,6 +282,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enablePropsUpdateReconciliationAndroid(): Boolean = accessor.enablePropsUpdateReconciliationAndroid()

/**
* Enables the ResizeObserver Web API in React Native.
*/
@JvmStatic
public fun enableResizeObserverByDefault(): Boolean = accessor.enableResizeObserverByDefault()

/**
* When enabled, RuntimeScheduler_Modern clears pending tasks and rendering updates before handling an error.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3331513151f7b17e3902cceb65aaac1e>>
* @generated SignedSource<<1a46e8aec0fa83ed44004564bd8a0a2d>>
*/

/**
Expand Down Expand Up @@ -62,6 +62,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableNativeCSSParsingCache: Boolean? = null
private var enablePreparedTextLayoutCache: Boolean? = null
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableResizeObserverByDefaultCache: Boolean? = null
private var enableRuntimeSchedulerQueueClearingOnErrorCache: Boolean? = null
private var enableSchedulerDelegateInvalidationCache: Boolean? = null
private var enableSwiftUIBasedFiltersCache: Boolean? = null
Expand Down Expand Up @@ -485,6 +486,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun enableResizeObserverByDefault(): Boolean {
var cached = enableResizeObserverByDefaultCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableResizeObserverByDefault()
enableResizeObserverByDefaultCache = cached
}
return cached
}

override fun enableRuntimeSchedulerQueueClearingOnError(): Boolean {
var cached = enableRuntimeSchedulerQueueClearingOnErrorCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<71e1be630ee2897f3546ccb23db60197>>
* @generated SignedSource<<05482cf4eb87a1b5d887471fab274a19>>
*/

/**
Expand Down Expand Up @@ -112,6 +112,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun enablePropsUpdateReconciliationAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun enableResizeObserverByDefault(): Boolean

@DoNotStrip @JvmStatic public external fun enableRuntimeSchedulerQueueClearingOnError(): Boolean

@DoNotStrip @JvmStatic public external fun enableSchedulerDelegateInvalidation(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<cdb20f0cac81beea272ca5de1c200e98>>
* @generated SignedSource<<2b1b95954a9308fddd48f2998dada46d>>
*/

/**
Expand Down Expand Up @@ -107,6 +107,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun enablePropsUpdateReconciliationAndroid(): Boolean = false

override fun enableResizeObserverByDefault(): Boolean = false

override fun enableRuntimeSchedulerQueueClearingOnError(): Boolean = false

override fun enableSchedulerDelegateInvalidation(): Boolean = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1a62a0c778f72aa89ef4acea182f17c8>>
* @generated SignedSource<<2db3a05998c8fad1b7806d438c264b4c>>
*/

/**
Expand Down Expand Up @@ -66,6 +66,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableNativeCSSParsingCache: Boolean? = null
private var enablePreparedTextLayoutCache: Boolean? = null
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableResizeObserverByDefaultCache: Boolean? = null
private var enableRuntimeSchedulerQueueClearingOnErrorCache: Boolean? = null
private var enableSchedulerDelegateInvalidationCache: Boolean? = null
private var enableSwiftUIBasedFiltersCache: Boolean? = null
Expand Down Expand Up @@ -531,6 +532,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun enableResizeObserverByDefault(): Boolean {
var cached = enableResizeObserverByDefaultCache
if (cached == null) {
cached = currentProvider.enableResizeObserverByDefault()
accessedFeatureFlags.add("enableResizeObserverByDefault")
enableResizeObserverByDefaultCache = cached
}
return cached
}

override fun enableRuntimeSchedulerQueueClearingOnError(): Boolean {
var cached = enableRuntimeSchedulerQueueClearingOnErrorCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3caf8a7b3aea3b40ff888e5f7f81e90d>>
* @generated SignedSource<<bd5a74440c6b73e10def527655401aaa>>
*/

/**
Expand Down Expand Up @@ -107,6 +107,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun enablePropsUpdateReconciliationAndroid(): Boolean

@DoNotStrip public fun enableResizeObserverByDefault(): Boolean

@DoNotStrip public fun enableRuntimeSchedulerQueueClearingOnError(): Boolean

@DoNotStrip public fun enableSchedulerDelegateInvalidation(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ add_react_common_subdir(react/renderer/leakchecker)
add_react_common_subdir(react/renderer/observers/events)
add_react_common_subdir(react/renderer/observers/intersection)
add_react_common_subdir(react/renderer/observers/mutation)
add_react_common_subdir(react/renderer/observers/resize)
add_react_common_subdir(react/renderer/textlayoutmanager)
add_react_common_subdir(react/utils)
add_react_common_subdir(react/bridging)
Expand All @@ -130,6 +131,7 @@ add_react_common_subdir(react/nativemodule/microtasks)
add_react_common_subdir(react/nativemodule/idlecallbacks)
add_react_common_subdir(react/nativemodule/intersectionobserver)
add_react_common_subdir(react/nativemodule/mutationobserver)
add_react_common_subdir(react/nativemodule/resizeobserver)
add_react_common_subdir(react/nativemodule/viewtransition)
add_react_common_subdir(react/nativemodule/webperformance)
add_react_common_subdir(react/networking)
Expand Down Expand Up @@ -202,6 +204,7 @@ add_library(reactnative
$<TARGET_OBJECTS:react_nativemodule_intersectionobserver>
$<TARGET_OBJECTS:react_nativemodule_microtasks>
$<TARGET_OBJECTS:react_nativemodule_mutationobserver>
$<TARGET_OBJECTS:react_nativemodule_resizeobserver>
$<TARGET_OBJECTS:react_nativemodule_viewtransition>
$<TARGET_OBJECTS:react_nativemodule_webperformance>
$<TARGET_OBJECTS:react_networking>
Expand All @@ -226,6 +229,7 @@ add_library(reactnative
$<TARGET_OBJECTS:react_renderer_observers_events>
$<TARGET_OBJECTS:react_renderer_observers_intersection>
$<TARGET_OBJECTS:react_renderer_observers_mutation>
$<TARGET_OBJECTS:react_renderer_observers_resize>
$<TARGET_OBJECTS:react_renderer_runtimescheduler>
$<TARGET_OBJECTS:react_renderer_scheduler>
$<TARGET_OBJECTS:react_renderer_telemetry>
Expand Down Expand Up @@ -302,6 +306,7 @@ target_include_directories(reactnative
$<TARGET_PROPERTY:react_nativemodule_intersectionobserver,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_nativemodule_microtasks,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_nativemodule_mutationobserver,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_nativemodule_resizeobserver,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_nativemodule_viewtransition,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_nativemodule_webperformance,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_networking,INTERFACE_INCLUDE_DIRECTORIES>
Expand All @@ -328,6 +333,7 @@ target_include_directories(reactnative
$<TARGET_PROPERTY:react_renderer_observers_events,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_observers_intersection,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_observers_mutation,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_observers_resize,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_runtimescheduler,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_scheduler,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:react_renderer_telemetry,INTERFACE_INCLUDE_DIRECTORIES>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1e6921044c4f10ecc5a5263b671772a2>>
* @generated SignedSource<<8739597f69da212bca25f02987da450e>>
*/

/**
Expand Down Expand Up @@ -291,6 +291,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool enableResizeObserverByDefault() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableResizeObserverByDefault");
return method(javaProvider_);
}

bool enableRuntimeSchedulerQueueClearingOnError() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableRuntimeSchedulerQueueClearingOnError");
Expand Down Expand Up @@ -769,6 +775,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid(
return ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid();
}

bool JReactNativeFeatureFlagsCxxInterop::enableResizeObserverByDefault(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableResizeObserverByDefault();
}

bool JReactNativeFeatureFlagsCxxInterop::enableRuntimeSchedulerQueueClearingOnError(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableRuntimeSchedulerQueueClearingOnError();
Expand Down Expand Up @@ -1146,6 +1157,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enablePropsUpdateReconciliationAndroid",
JReactNativeFeatureFlagsCxxInterop::enablePropsUpdateReconciliationAndroid),
makeNativeMethod(
"enableResizeObserverByDefault",
JReactNativeFeatureFlagsCxxInterop::enableResizeObserverByDefault),
makeNativeMethod(
"enableRuntimeSchedulerQueueClearingOnError",
JReactNativeFeatureFlagsCxxInterop::enableRuntimeSchedulerQueueClearingOnError),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<28884240a4d0cedf7e1ecfaf34378f8e>>
* @generated SignedSource<<911cd43520269b1d56c1ddf2dd3ca1dd>>
*/

/**
Expand Down Expand Up @@ -156,6 +156,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enablePropsUpdateReconciliationAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableResizeObserverByDefault(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableRuntimeSchedulerQueueClearingOnError(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ Pod::Spec.new do |s|
sss.exclude_files = "react/renderer/observers/mutation/tests"
sss.header_dir = "react/renderer/observers/mutation"
end

ss.subspec "resize" do |sss|
sss.source_files = podspec_sources("react/renderer/observers/resize/**/*.{m,mm,cpp,h}", "react/renderer/observers/resize/**/*.h")
sss.exclude_files = "react/renderer/observers/resize/tests"
sss.header_dir = "react/renderer/observers/resize"
end
end

s.subspec "telemetry" do |ss|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c7589193e853646b63d50a4431647521>>
* @generated SignedSource<<ec50513f7a5ded7e72608490f8182c0f>>
*/

/**
Expand Down Expand Up @@ -194,6 +194,10 @@ bool ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid() {
return getAccessor().enablePropsUpdateReconciliationAndroid();
}

bool ReactNativeFeatureFlags::enableResizeObserverByDefault() {
return getAccessor().enableResizeObserverByDefault();
}

bool ReactNativeFeatureFlags::enableRuntimeSchedulerQueueClearingOnError() {
return getAccessor().enableRuntimeSchedulerQueueClearingOnError();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<214d05a6296f10f2a7ac67a15dc66d1c>>
* @generated SignedSource<<8a4bac5ae633edc1dba3c72db3321f89>>
*/

/**
Expand Down Expand Up @@ -249,6 +249,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enablePropsUpdateReconciliationAndroid();

/**
* Enables the ResizeObserver Web API in React Native.
*/
RN_EXPORT static bool enableResizeObserverByDefault();

/**
* When enabled, RuntimeScheduler_Modern clears pending tasks and rendering updates before handling an error.
*/
Expand Down
Loading
Loading