mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 02:34:44 +08:00
Summary:
This showcases SampleTurboModule usage in RNTester. Notes:
* iOS only for now, and you must use cocoapods version.
* You cannot use Chrome debugger when loading this specific example.
As illustrated in the example, the callsite should access `NativeSampleTurboModule` to access the native side.
{F155901711}
Reviewed By: cpojer
Differential Revision: D14932537
fbshipit-source-id: a733e1cd3b642b9e572d5ac6347f4775d495578a
27 lines
612 B
JavaScript
27 lines
612 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its 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 SampleTurboModuleExample = require('SampleTurboModuleExample');
|
|
|
|
exports.displayName = (undefined: ?string);
|
|
exports.title = 'TurboModule';
|
|
exports.description = 'Usage of TurboModule';
|
|
exports.examples = [
|
|
{
|
|
title: 'SampleTurboModule',
|
|
render: function(): React.Element<any> {
|
|
return <SampleTurboModuleExample />;
|
|
},
|
|
},
|
|
];
|