mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
React sync for revisions 7a3416f...725c054
Reviewed By: bvaughn Differential Revision: D7565731 fbshipit-source-id: 91d76a11b7c91dab2fb3295418d1372ca9c1b572
This commit is contained in:
committed by
Facebook Github Bot
parent
ba45895a3f
commit
906dde06b3
@@ -10,9 +10,23 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
||||
} = require('ReactNative');
|
||||
import type {ViewConfigGetter} from './ReactNativeTypes';
|
||||
|
||||
module.exports =
|
||||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.createReactNativeComponentClass;
|
||||
const {register} = 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 register(name, callback);
|
||||
};
|
||||
|
||||
module.exports = createReactNativeComponentClass;
|
||||
|
||||
Reference in New Issue
Block a user