Upstream Community Incompatible Changes

This document tracks incompatible changes from the upstream React Native community that may affect HarmonyOS adaptation.

No. Title Change Details Source Version Impact on Developers Impact Scenario Reference
1 ScrollViewShadowNode's getContentOriginOffset adds parameter: includeTransform Added parameter to getContentOriginOffset to fix reversed flatlist scrolling issue 0.74.0-rc4 Fixed reversed flatlist scrolling. Developers customizing ScrollView and calling getContentOriginOffset need to add boolean parameter includeTransform Dev: Custom ScrollView compilation
Runtime: Reversed flatlist scrolling
https://github.com/facebook/react-native/pull/44822
2 TouchableHighlight cannot be referenced as TouchableHighlight class Corrected TouchableHighlight useRef reference to only use React.ElementRef or View 0.75.0 TouchableHighlight cannot be used as value or type reference. Use React.ElementRef<typeof TouchableHighlight> or View instead Dev & Runtime: Using useRef with TouchableHighlight https://github.com/facebook/react-native/pull/44038
3 Stricter parameter checking for codegen methods in NativeModule Passing null to codegen methods that don't accept null will now throw error 0.75.0 In TurboModule, passing null to functions that don't accept null will cause runtime error Dev: TurboModule null handling
Runtime: Error on null input
https://github.com/facebook/react-native/commit/67b9628af588e8fc778d732fc387dbd48acf705e
4 Rename JS error handler method type C++ JsErrorHandler::JsErrorHandlingFunc renamed to JsErrorHandler::OnJsError 0.75.0 RNInstance and similar classes need to use JsErrorHandler::OnJsError type Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/43985
5 Remove unused includes from ReactPrimitives Removed include folly/dynamic.h and memory from ReactPrimitives.h 0.75.0 C++ code including ReactPrimitives.h may fail to find functions from folly/dynamic or memory Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/43806
6 Partially visible elements can be list anchors Previously only fully visible elements could be anchors, now partially visible elements can also be anchors 0.75.0 Test list loading new elements to ensure list behavior still matches expectations Dev: No impact
Runtime: List loading new elements
https://github.com/facebook/react-native/pull/43203
7 SyncCallback copy prohibited SyncCallback copy prohibited, added move support 0.75.0 Copying SyncCallback objects will fail compilation. Use move or create multiple callbacks Dev: Compilation failure
Runtime: Possible crash
https://github.com/facebook/react-native/pull/43268
8 Component onLayout event priority lowered Changed onLayout event priority from configurable async batch/non-batch to fixed async batch 0.74.0 onLayout event timing affected. Note execution order with nearby lifecycle functions like componentDidUpdate Dev: No impact
Runtime: onLayout timing and order
https://github.com/facebook/react-native/pull/42631
9 Animation's __onEnd no longer exposed to subclasses Subclasses should use __debouncedOnEnd instead 0.77.0-rc.0 Compilation failure Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/46271
10 enableOptimisedVirtualizedCells flag removed enableOptimisedVirtualizedCells flag removed, default effect changed from false to true 0.77.0-rc.0 Compilation failure Dev: Compilation failure
Runtime: Performance optimization
https://github.com/facebook/react-native/pull/47724
11 concurrentRoot startup option removed ConcurrentRoot no longer used to decide concurrent mode application 0.77.0-rc.0 Compilation failure Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/47512
12 Removed NativeMethods refs-related configuration String refs deprecated, so removed NativeMethods related configuration 0.77.0-rc.0 Compilation failure Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/46734
13 Removed direct dependency on @react-native-community/cli Removed direct dependency on @react-native-community/cli 0.76.0-rc.1 Build failure Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/45927
14 Removed direct dependency on @react-native-community Removed direct dependency on @react-native-community 0.76.0-rc.0 Build failure Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/44928
15 Three rendering feature flags default changed to enabled Three rendering feature flags default changed to enabled, allows interrupting render loop to respond to JS events 0.74.1-rc0 Compilation failure Dev: Compilation failure
Runtime: Performance optimization
https://github.com/facebook/react-native/pull/43396
16 No longer publishing certain third-party library Flow type definitions as part of "react native" package Moved flow-typed/ directory from package/react-native/flow-typed/ to community repository 0.73.0 react-native no longer contains Flow definitions for some third-party libraries Dev: JS bundle failure
Runtime: Metro debug may show red screen
https://github.com/facebook/react-native/pull/37636
17 TypeScript stricter checking of style transform syntax <View style={{transform: [{scale: 1, translateX: 1}]}}> will error after 0.73.0 0.73.0 Using invalid transform syntax will cause error Dev: JS bundle failure
Runtime: Metro debug may show red screen
https://github.com/facebook/react-native/pull/38348
18 Removed YOGA enum YGExperimentalFeatureFixAbsoluteTrailingColumnMargin Removed YOGA enum and CSS property fix-absolute-trailing-column-margin 0.73.0 Using removed enum will cause compilation failure. CSS property removal may affect layout Dev: Compilation failure
Runtime: Component layout
https://github.com/facebook/react-native/pull/37374
19 so list changed so list changed, may affect CMakeLists so integration configuration 0.76.0 Compilation failure Build Documentation pending
20 JSX file dictionary type parameters with comma-separated multiple dictionaries cause bundle error JSX style like style={{key1: value1}, {key2: value2}} will error with 0.76.0+ @react-native/babel-preset 0.76.0 JS bundle error Dev: Build failure
Runtime: No impact
https://github.com/facebook/react-native/pull/46696
21 Removed butter component Removed butter component from ReactCommon, all symbols under butter namespace unavailable 0.73.0 Compilation error Dev: Compilation failure
Runtime: No impact
https://github.com/facebook/react-native/pull/39494
22 View Manager definition no longer supports tsx file type @react-native/babel-preset with @react-native/babel-plugin-codegen validates file type, only supports ts, not tsx 0.73.0 JS bundle error with message like error xx.tsx: Unable to parse file 'xx.tsx'. Unsupported filename extension. Dev: Build failure
Runtime: No impact
https://github.com/facebook/react-native/pull/38227