mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
[react-packager][streamline oss] Move open sourced JS source to react-native-github
This commit is contained in:
20
Libraries/ReactIOS/renderApplication.ios.js
Normal file
20
Libraries/ReactIOS/renderApplication.ios.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule renderApplication
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var React = require('React');
|
||||
|
||||
var invariant = require('invariant');
|
||||
|
||||
function renderApplication(RootComponent, initialProps, rootTag) {
|
||||
invariant(
|
||||
rootTag,
|
||||
'Expect to have a valid rootTag, instead got ', rootTag
|
||||
);
|
||||
React.render(<RootComponent {...initialProps} />, rootTag);
|
||||
}
|
||||
|
||||
module.exports = renderApplication;
|
||||
Reference in New Issue
Block a user