react-native/Libraries/ReactIOS/renderApplication.js

21 lines
449 B
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* 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;