diff --git a/Libraries/Portal/Portal.js b/Libraries/Portal/Portal.js deleted file mode 100644 index 762af3661..000000000 --- a/Libraries/Portal/Portal.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @providesModule Portal - * @flow - */ -'use strict'; - -var React = require('React'); -var StyleSheet = require('StyleSheet'); -var View = require('View'); - -var _portalRef: any; - -/* - * A container that renders all the modals on top of everything else in the application. - * - * Portal makes it possible for application code to pass modal views all the way up to - * the root element created in `renderApplication`. - * - * Never use `` in your code. There is only one Portal instance rendered - * by the top-level `renderApplication`. - */ -var Portal = React.createClass({ - statics: { - showModal: function(component) { - if (!_portalRef) { - console.error('Calling showModal but no Portal has been rendered'); - return; - } - _portalRef.setState({modal: component}); - }, - - closeModal: function() { - if (!_portalRef) { - console.error('Calling closeModal but no Portal has been rendered'); - return; - } - _portalRef.setState({modal: null}); - }, - }, - - getInitialState: function() { - return {modal: (null: any)}; - }, - - render: function() { - _portalRef = this; - if (!this.state.modal) { - return ; - } - return ( - - {this.state.modal} - - ); - } -}); - -var styles = StyleSheet.create({ - modalsContainer: { - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - }, -}); - -module.exports = Portal; diff --git a/Libraries/ReactIOS/renderApplication.js b/Libraries/ReactIOS/renderApplication.ios.js similarity index 59% rename from Libraries/ReactIOS/renderApplication.js rename to Libraries/ReactIOS/renderApplication.ios.js index dbec1e853..084390ac5 100644 --- a/Libraries/ReactIOS/renderApplication.js +++ b/Libraries/ReactIOS/renderApplication.ios.js @@ -11,10 +11,7 @@ */ 'use strict'; -var Portal = require('Portal'); var React = require('React'); -var StyleSheet = require('StyleSheet'); -var View = require('View'); var invariant = require('invariant'); @@ -28,26 +25,11 @@ function renderApplication( 'Expect to have a valid rootTag, instead got ', rootTag ); React.render( - - - - , + , rootTag ); } -var styles = StyleSheet.create({ - // This is needed so the application covers the whole screen - // and therefore the contents of the Portal are not clipped. - appContainer: { - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - }, -}); - module.exports = renderApplication;