diff --git a/Libraries/Components/UnimplementedViews/UnimplementedView.js b/Libraries/Components/UnimplementedViews/UnimplementedView.js index e7c488bdd..ace85ac7f 100644 --- a/Libraries/Components/UnimplementedViews/UnimplementedView.js +++ b/Libraries/Components/UnimplementedViews/UnimplementedView.js @@ -8,26 +8,27 @@ * * @providesModule UnimplementedView * @flow + * @format */ 'use strict'; -var React = require('React'); -var StyleSheet = require('StyleSheet'); +const React = require('React'); +const StyleSheet = require('StyleSheet'); /** * Common implementation for a simple stubbed view. Simply applies the view's styles to the inner * View component and renders its children. */ class UnimplementedView extends React.Component { - setNativeProps = () => { + setNativeProps() { // Do nothing. // This method is required in order to use this view as a Touchable* child. // See ensureComponentIsNative.js for more info - }; + } render() { // Workaround require cycle from requireNativeComponent - var View = require('View'); + const View = require('View'); return ( {this.props.children} @@ -36,12 +37,14 @@ class UnimplementedView extends React.Component { } } -var styles = StyleSheet.create({ - unimplementedView: { - borderWidth: 1, - borderColor: 'red', - alignSelf: 'flex-start', - } +const styles = StyleSheet.create({ + unimplementedView: __DEV__ + ? { + alignSelf: 'flex-start', + borderColor: 'red', + borderWidth: 1, + } + : {}, }); module.exports = UnimplementedView;