Skip to content

Align SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985) - #57985

Closed
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D116375214
Closed

Align SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985)#57985
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D116375214

Conversation

@christophpurrer

@christophpurrerchristophpurrer commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary:

The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
SampleTurboModuleExample with the style already used by
NativeCxxModuleExampleExample:

  • Order and group the entries in _tests the same way (callback, ArrayBuffer
    group, get* group, promises, voidFunc), so the buttons render in the same
    order on both screens.
  • Make the Examples union match the tests that actually exist; it still listed
    many entries copied from the C++ example that SampleTurboModule does not
    implement (getCustomHostObject, getSet, setMenuItem, ...) and was missing
    getEnum, getRootTag and getUnsafeObject.
  • Add the missing installJSIBindings entry to ErrorExamples and type
    _renderResult as Examples | ErrorExamples.
  • Surface rejected promises from the error tests in the UI instead of only
    logging them to the console, matching the other screen.
  • Fix getUnsafeObject to call getUnsafeObject instead of getObject.
  • Merge the duplicated NativeSampleTurboModule imports and drop a stale Flow
    suppression.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D116375214

@meta-clameta-claBot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 17, 2026
@meta-codesync

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116375214.

@meta-codesyncmeta-codesyncBot changed the title Align SampleTurboModuleExample UI with NativeCxxModuleExampleExampleAlign SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985)Aug 18, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 18, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Differential Revision: D116375214
@christophpurrer
christophpurrerforce-pushed the export-D116375214 branch 2 times, most recently from b306383 to 1cdaa90CompareAugust 18, 2026 17:53
@meta-codesyncmeta-codesyncBot changed the title Align SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985)Align SampleTurboModuleExample UI with NativeCxxModuleExampleExampleAug 18, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 18, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Differential Revision: D116375214
@meta-codesyncmeta-codesyncBot changed the title Align SampleTurboModuleExample UI with NativeCxxModuleExampleExampleAlign SampleTurboModuleExample UI with NativeCxxModuleExampleExample (#57985)Aug 18, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 18, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Differential Revision: D116375214
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 18, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Differential Revision: D116375214
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 19, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Differential Revision: D116375214
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 20, 2026
…eact#57985)
Summary:
Pull Request resolved: react#57985
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D116375214
…eact#57985)
Summary:
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D116375214
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 20, 2026
…eact#57985)
Summary:
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D116375214
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Aug 20, 2026
…eact#57985)
Summary:
The two RNTester TurboModule example screens had drifted apart, making it hard to
compare TurboModule and C++ TurboModule behaviour side by side. Align
`SampleTurboModuleExample` with the style already used by
`NativeCxxModuleExampleExample`:
- Order and group the entries in `_tests` the same way (callback, ArrayBuffer
group, `get*` group, promises, `voidFunc`), so the buttons render in the same
order on both screens.
- Make the `Examples` union match the tests that actually exist; it still listed
many entries copied from the C++ example that `SampleTurboModule` does not
implement (`getCustomHostObject`, `getSet`, `setMenuItem`, ...) and was missing
`getEnum`, `getRootTag` and `getUnsafeObject`.
- Add the missing `installJSIBindings` entry to `ErrorExamples` and type
`_renderResult` as `Examples | ErrorExamples`.
- Surface rejected promises from the error tests in the UI instead of only
logging them to the console, matching the other screen.
- Fix `getUnsafeObject` to call `getUnsafeObject` instead of `getObject`.
- Merge the duplicated `NativeSampleTurboModule` imports and drop a stale Flow
suppression.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D116375214
@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Aug 20, 2026
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in 26f7074.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@christophpurrer