Skip to content

Upgrading react-native 0.76 to 0.77

Breaking0.76.9 → 0.77.3Breaking68Security1Platform1Deprecated5New59Changed53Fixed170Other16

BreakingUpgrade verdict

63 breaking changes and a platform requirement change and a security fix.

  • The ReactFabricInternals module is gone, so any code importing it will break.
  • Looping animations run natively without triggering a React re-render on every loop.
  • Android code calling getBackgroundColor() on ReactViewGroup will no longer compile.
  • The getDefaultReactHost() helper no longer accepts a jsBundleLoader argument.
Top 5 of 70 that need code or config changes

react-native publishes official migration guides for versions 0.77, 0.77. They cover more than the release notes do.

Upgrade Helper ↗Upgrade Helper ↗
Breaking63
Removes the ReactFabricInternals module.
ReactFabricInternals
Native looping animations no longer send a React state update each time they finish.
Removes ReactViewGroup.getBackgroundColor() on Android.
ReactViewGroup.getBackgroundColor()
Removes jsBundleLoader from DefaultReactHost.getDefaultReactHost() on Android.
DefaultReactHost.getDefaultReactHost()jsBundleLoader
Renames DevSupportManagerBase.getCurrentContext() to getCurrentReactContext().
DevSupportManagerBase.getCurrentContext()DevSupportManagerBase.getCurrentReactContext()
Deletes deprecated CompositeReactPackage.
CompositeReactPackage
Removes the deprecated DefaultDevSupportManagerFactory.create().
DefaultDevSupportManagerFactory.create()
Removes BaseViewManagerInterface.
BaseViewManagerInterface
Removes the ReactNativeFlipper object, deprecated in 0.75.
ReactNativeFlipper
Deletes useTurboModules, enableFabricRenderer and enableBridgelessArchitecture fields from ReactFeatureFlags.
ReactFeatureFlagsuseTurboModulesenableFabricRendererenableBridgelessArchitecture
Removes ReactViewBackgroundManager and ReactViewBackgroundDrawable.
ReactViewBackgroundManagerReactViewBackgroundDrawable
Deletes partialBatchDidFlush.
partialBatchDidFlush
Removes RCTRuntimeExecutor, deprecated in 0.76.
RCTRuntimeExecutor
AttributedString appendFragment and prependFragment now take an rval instead of a const ref, and append/prependAttributedString are removed.
AttributedStringappendFragmentprependFragmentappendAttributedStringprependAttributedString
The Animation superclass no longer exposes __onEnd; subclasses must call super.start() in their start() implementation.
Animation__onEndstart()
AnimatedNode and its subclasses no longer implement toJSON().
AnimatedNodetoJSON()
RCTSurfaceHostingProxyRootView no longer calls start on the surface depending on the initializer used.
RCTSurfaceHostingProxyRootViewstart
Renames RCTUIGraphicsImageRenderer to RCTMakeUIGraphicsImageRenderer.
RCTUIGraphicsImageRendererRCTMakeUIGraphicsImageRenderer
Removes BackHandler.removeEventListener.
BackHandler.removeEventListener
Removes the type for useConcurrentRoot from AppRegistry, as it was already ignored.
useConcurrentRootAppRegistry
Removes "run on iOS" and "run on Android" from the dev server key commands.
Removes the refs property from the NativeMethods TypeScript definition.
NativeMethodsrefs
Removes the hasConstants constructor from ReactModuleInfo.
ReactModuleInfohasConstants
Removes TurboReactPackage, which was replaced by BaseReactPackage.
TurboReactPackageBaseReactPackage
BindingImpl is no longer part of the public interface.
BindingImpl
Removes FabricComponents from the public Android API.
FabricComponents
Removes the available check for RCTKeyWindow on iOS.
RCTKeyWindow
Bridgeless mode makes NativeModules.foo load turbomodules by unsetting turboModuleProxy.
NativeModules.footurboModuleProxy
dev-middleware frameworks must specify serverBaseUrl relative to the middleware host.
serverBaseUrl
The position of sticky headers on ScrollView is now taken into account.
ScrollViewposition
Makes absolute positioning more spec compliant.
ReadableArray non-primitive getters are now correctly typed as optional on Android.
ReadableArray
Reduces the visibility of the TaskCompletionSource class on Android.
TaskCompletionSource
Undoes the breaking change to the UiManager.eventDispatcher return type.
UiManager.eventDispatcher
Undoes a breaking change on the ReactViewGroup constructor.
ReactViewGroup
Makes DevSupportManagerBase.getCurrentReactContext() public.
DevSupportManagerBase.getCurrentReactContext()
Adds JSBundleLoader as a parameter of DefaultReactHost.
JSBundleLoaderDefaultReactHost
Makes ReactHost.createSurface() non nullable.
ReactHost.createSurface()
Undoes a breaking change on the UIManager eventDispatcher accessor.
UIManager
Undoes a breaking change on ViewManagerDelegate.kt String params.
ViewManagerDelegate
Adds 3 methods to ReactInstanceDevHelper.
ReactInstanceDevHelper
Uses BackgroundStyleApplicator when setting background color in BaseViewManager.
BackgroundStyleApplicatorBaseViewManager
Uses the RCTDependencyProvider in RCTAppDelegate, breaking the dependency with Codegen.
RCTDependencyProviderRCTAppDelegate
Deletes the experimental API RCTConstants.RCTGetMemoryPressureUnloadLevel.
RCTConstants.RCTGetMemoryPressureUnloadLevel
Replaces uses of CGColorRef with UIColor to avoid manual memory management.
CGColorRefUIColor
Lets Cocoapods decide the C++ version for iOS pods.
Cocoapods
Animations with incompatible useNativeDriver and AnimatedValue configurations now fail synchronously instead of asynchronously.
useNativeDriverAnimatedValue
TurboModule::get is now a final method; override create to customize property lookup.
TurboModule::getcreate
Makes ReactDebugOverlayTags, DebugOverlayTags, Printer, PrinterHolder and NoopPrinter internal.
ReactDebugOverlayTagsDebugOverlayTagsPrinterPrinterHolderNoopPrinter
Makes ImageStoreManager internal as part of the stable API effort.
ImageStoreManagerSwipeRefreshLayoutManagerOkHttpCallUtilSimpleSettableFutureClipboardModule
Makes classes inside com.facebook.react.views.progressbar internal.
com.facebook.react.views.progressbar
Reduces the visibility of ReactVirtualTextShadowNode to internal.
ReactVirtualTextShadowNode
Reduces visibility of ReactVirtualTextViewManager to internal.
ReactVirtualTextViewManager
Makes classes in com.facebook.react.views.safeareaview internal.
com.facebook.react.views.safeareaview
Makes ClipboardModule internal.
ClipboardModule
Makes NativeModulePerfLogger internal.
NativeModulePerfLogger
Makes DevLoadingModule internal.
DevLoadingModule
Converts NotThreadSafeViewHierarchyUpdateDebugListener to Kotlin and makes it internal.
NotThreadSafeViewHierarchyUpdateDebugListener
Reduces visibility of ReactUnimplementedViewManager to internal.
ReactUnimplementedViewManager
Makes InteropModuleRegistry internal.
InteropModuleRegistry
Makes ReactDevToolsSettingsManagerModule and ReactDevToolsRuntimeSettingsModule internal.
ReactDevToolsSettingsManagerModuleReactDevToolsRuntimeSettingsModule
Makes AppStateModule internal.
AppStateModule
Makes AccessibilityInfoModule internal.
AccessibilityInfoModule
Security1
Bumps serve-static to 1.16.2 to fix CVE-2024-43800.
serve-static
Platform1
Updates targetSdk to 35, though apps can still choose their own targetSdk regardless of React Native version.
targetSdk
Deprecated5
Deprecates CatalystInstance in the old architecture.
CatalystInstance
Deprecates the BridgelessCatalystInstance class.
BridgelessCatalystInstance
Deprecates shadows for ReadableNative[Map|Array].[Readable|Writable].
ReadableNativeMapReadableNativeArray
Deprecates the ReactContext.getFabricUIManager() method.
ReactContext.getFabricUIManager()
Deprecates RCTBridgeModule batchDidComplete and adds configuration to disable it.
RCTBridgeModulebatchDidComplete

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • added: property ActionSheetIOSOptions.disabledButtonTintColor?: ColorValue | ProcessedColorValue | undefined
  • changed: property AccessibilityInfoStatic.sendAccessibilityEvent: (handle: React.ElementRef<HostComponent<unknown>>, eventType: AccessibilityEventTypes) => void → property AccessibilityInfoStatic.sendAccessibilityEvent: (handle: HostInstance, eventType: AccessibilityEventTypes) => void
  • added: property AccessibilityInfoStatic.isDarkerSystemColorsEnabled: () => Promise<boolean>
  • added: property AccessibilityInfoStatic.isHighTextContrastEnabled: () => Promise<boolean>
  • added: property TextInputIOSProps.lineBreakModeIOS?: | 'wordWrapping' | 'char' | 'clip' | 'head' | 'middle' | 'tail' | undefined
  • added: property ViewProps.experimental_layoutConformance?: 'strict' | 'classic' | undefined
  • removed: const DevToolsSettingsManager: DevToolsSettingsManagerStatic
  • removed: interface DevToolsSettingsManagerStatic
  • removed: method DevToolsSettingsManagerStatic.getConsolePatchSettings(): string | null
  • removed: method DevToolsSettingsManagerStatic.getProfilingSettings(): string | null
  • removed: method DevToolsSettingsManagerStatic.reload(): void
  • removed: method DevToolsSettingsManagerStatic.setConsolePatchSettings(newSettings: string): void
  • removed: method DevToolsSettingsManagerStatic.setProfilingSettings(newSettings: string): void
  • removed: type DevToolsSettingsManager = DevToolsSettingsManagerStatic
  • removed: property ImagePropsBase.resizeMethod?: 'auto' | 'resize' | 'scale' | undefined
  • changed: type ImageResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center' → type ImageResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center' | 'none'
  • added: property ImageResizeModeStatic.none: ImageResizeMode
  • changed: property FlatListComponent.setNativeProps: (props: { [key: string]: any }) => void → property FlatListComponent.setNativeProps: (props: { [key: string]: unknown }) => void
  • added: property ModalBaseProps.backdropColor?: ColorValue | undefined
  • added: property ModalPropsAndroid.navigationBarTranslucent?: boolean | undefined
  • changed: property PermissionsAndroidStatic.PERMISSIONS: { [key: string]: Permission } → property PermissionsAndroidStatic.PERMISSIONS: { [key in | 'READ_CALENDAR' | 'WRITE_CALENDAR' | 'CAMERA' | 'READ_CONTACTS' | 'WRITE_CONTACTS' | 'GET_ACCOUNTS' | 'ACCESS_FINE_LOCATION' | 'ACCESS_COARSE_LOCATION' | 'ACCESS_BACKGROUND_LOCATION' | 'RECORD_AUDIO' | 'READ_PHONE_STATE' | 'CALL_PHONE' | 'READ_CALL_LOG' | 'WRITE_CALL_LOG' | 'ADD_VOICEMAIL' | 'READ_VOICEMAIL' | 'WRITE_VOICEMAIL' | 'USE_SIP…
  • changed: property PermissionsAndroidStatic.RESULTS: { [key: string]: PermissionStatus } → property PermissionsAndroidStatic.RESULTS: { [key in 'GRANTED' | 'DENIED' | 'NEVER_ASK_AGAIN']: PermissionStatus }
  • changed: property FlexStyle.display?: 'none' | 'flex' | undefined → property FlexStyle.display?: 'none' | 'flex' | 'contents' | undefined
  • changed: property ImageStyle.objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined → property ImageStyle.objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined
  • added: property FlexStyle.boxSizing?: 'border-box' | 'content-box' | undefined
  • added: property ViewStyle.experimental_backgroundImage?: | ReadonlyArray<GradientValue> | string | undefined
  • added: property ViewStyle.mixBlendMode?: BlendMode | undefined
  • added: property ViewStyle.outlineColor?: ColorValue | undefined
  • added: property ViewStyle.outlineOffset?: AnimatableNumericValue | undefined
  • added: property ViewStyle.outlineStyle?: 'solid' | 'dotted' | 'dashed' | undefined
  • added: property ViewStyle.outlineWidth?: AnimatableNumericValue | undefined
  • changed: interface NativeSyntheticEvent<T> extends React.BaseSyntheticEvent<T, React.ElementRef<HostComponent<unknown>>, React.ElementRef<HostComponent<unknown>>> → interface NativeSyntheticEvent<T> extends React.BaseSyntheticEvent<T, HostInstance, HostInstance>
  • changed: readonly property NativeMouseEvent.relatedTarget: | null | number | React.ElementRef<HostComponent<unknown>> → readonly property NativeMouseEvent.relatedTarget: null | number | HostInstance
  • removed: method BackHandlerStatic.removeEventListener(eventName: BackPressEventName, handler: () => boolean | null | undefined): void
  • removed: interface ViewProps
  • removed: interface ViewStyle
  • removed: property ViewProps.experimental_layoutConformance?: 'strict' | 'classic' | undefined
  • removed: property ViewStyle.experimental_backgroundImage?: | ReadonlyArray<GradientValue> | string | undefined
  • removed: property ViewStyle.experimental_mixBlendMode?: BlendMode | undefined
  • added: const DevMenu: DevMenuStatic
  • added: interface DevMenuStatic
  • added: method DevMenuStatic.show(): void
  • removed: declare module '.'
  • removed: export * from '../Libraries/DevToolsSettings/DevToolsSettingsManager'
  • added: export * from '../src/private/devmenu/DevMenu'
  • removed: property NativeMethods.refs: { [key: string]: React.Component<any, any> }
  • changed: method NativeMethods.measureLayout(relativeToNativeComponentRef: | React.ElementRef<HostComponent<unknown>> | number, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void): void → method NativeMethods.measureLayout(relativeToNativeComponentRef: HostInstance | number, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void): void
  • changed: new HostComponent(props: P, context?: any): React.Component<P> & Readonly<NativeMethods> → new HostComponent(props: P, context?: any): React.Component<P> & HostInstance
  • added: type HostInstance = NativeMethods