/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
scripts/rollup/shims/react-native/createReactNativeComponentClass.js
34 строки
945 B
Alex Hunt
Update React Native shims to use export syntax (#31426)
07 ноя 2024, 17:53
Не верифицирован
07 ноя 2024, 17:53
5c56b87
Код
Авторство
О чём код?
/** * 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. * * @noformat * @nolint * @flow strict-local */ 'use strict'; import {ReactNativeViewConfigRegistry} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'; import {type ViewConfig} from './ReactNativeTypes'; const {register} = ReactNativeViewConfigRegistry; /** * Creates a renderable ReactNative host component. * Use this method for view configs that are loaded from UIManager. * Use createReactNativeComponentClass() for view configs defined within JavaScript. * * @param {string} config iOS View configuration. * @private */ const createReactNativeComponentClass = function ( name: string, callback: () => ViewConfig, ): string { return register(name, callback); }; export default createReactNativeComponentClass;