Files
react/packages/react-native-renderer/src/createReactNativeComponentClass.js
T
Dan Abramov 087c48bb36 Reorder imports (#11359)
* Reorder imports

* Record sizes
2017-10-25 21:07:54 +03:00

32 lines
858 B
JavaScript

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
import type {ViewConfigGetter} from './ReactNativeTypes';
const ReactNativeViewConfigRegistry = require('./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: ViewConfigGetter,
): string {
return ReactNativeViewConfigRegistry.register(name, callback);
};
module.exports = createReactNativeComponentClass;