mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38008 Introduce a legacy module (+ example) in RNTester. In the future, SampleLegacyModule will be used to: - Showcase the TurboModule interop layer in RNTester, once Bridgeless mode is ready - E2E Test the TurboModule interop layer. The TurboModule interop layer is just an extension to the TurboModule system that allows the system to create legacy modules. Unlike regular TurboModules, these legacy modules don't need codegen for JavaScript -> native method dispatch. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D46874160 fbshipit-source-id: f9810d0bdb3bd0c0a74099fcb6f74ca547977a53
30 lines
683 B
JavaScript
30 lines
683 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const React = require('react');
|
|
const {
|
|
default: SampleLegacyModuleExample,
|
|
} = require('./SampleLegacyModuleExample');
|
|
|
|
exports.displayName = (undefined: ?string);
|
|
exports.title = 'Legacy Native Module';
|
|
exports.category = 'Basic';
|
|
exports.description = 'Usage of legacy Native Module';
|
|
exports.examples = [
|
|
{
|
|
title: 'SampleLegacyModule',
|
|
render: function (): React.Element<any> {
|
|
return <SampleLegacyModuleExample />;
|
|
},
|
|
},
|
|
];
|