react-native
Version:
A framework for building native apps using React
37 lines (31 loc) • 1.06 kB
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.
*
* @noformat
* @flow strict-local
* @generated SignedSource<<4f1549884fbe8fc2aea495692e3f665d>>
*
* This file was sync'd from the facebook/react repository.
*/
;
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);
};
module.exports = createReactNativeComponentClass;