Skip to content

fix(ios): initialize surface props in BottomSheetSurfaceComponentView - #72

Open
JaMinsane wants to merge 1 commit into
software-mansion-labs:mainfrom
JaMinsane:fix/ios-initialize-surface-props-rn-087
Open

fix(ios): initialize surface props in BottomSheetSurfaceComponentView#72
JaMinsane wants to merge 1 commit into
software-mansion-labs:mainfrom
JaMinsane:fix/ios-initialize-surface-props-rn-087

Conversation

@JaMinsane

@JaMinsane JaMinsane commented Aug 17, 2026

Copy link
Copy Markdown

Problem

Fabric requires every RCTViewComponentView subclass to initialize _props with its concrete default props.

BottomSheetComponentView already follows this contract, but BottomSheetSurfaceComponentView did not. In an iOS debug build using React Native 0.87.0, mounting BottomSheetSurfaceView for a non-null surface therefore triggered the following assertion:

`RCTViewComponentView` subclasses (and `BottomSheetSurfaceComponentView` particularly) must setup `_props` instance variable with a default value in the constructor.

This caused a ModalBottomSheet to terminate the application before becoming visible.

Fix

This PR imports the generated props header and initializes _props with BottomSheetSurfaceViewProps in initWithFrame:.

This matches the existing implementation in BottomSheetComponentView and satisfies the Fabric component-view contract.

There are no JavaScript API or Android behavior changes.

Verification

  • Reproduced the crash on iOS with React Native 0.87.0 and Fabric.
  • Built and launched the affected application with this change.
  • Verified that the affected ModalBottomSheet opens without the native exception.
  • Verified that the application's other bottom-sheet flows continue working.
  • Confirmed that BottomSheetSurfaceViewProps matches the component descriptor used by BottomSheetSurfaceComponentView.

@JaMinsane JaMinsane changed the title fix(ios): initialize '_props' in BottomSheetSurfaceComponentView (RN 0.87) fix(ios): initialize surface props in BottomSheetSurfaceComponentView Aug 17, 2026
@JaMinsane
JaMinsane marked this pull request as ready for review August 17, 2026 00:47
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.

1 participant