Merge pull request #61 from azendoo/master

Separate React from React Native
This commit is contained in:
Alexey 2016-05-15 10:17:42 +09:00
commit 448fcaa56e
4 changed files with 23 additions and 13 deletions

View File

@ -4,13 +4,14 @@
*/
'use strict';
var React = require('react-native');
var ReactNative = require('react-native');
var React = require('react');
var {
AppRegistry,
StyleSheet,
Text,
View,
} = React;
} = ReactNative;
var Basic = React.createClass({
render: function() {

View File

@ -1,12 +1,17 @@
var React = require('react-native');
var React = require('react');
var {
Component,
PropTypes
} = React;
var ReactNative = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
Image,
Component,
} = React;
} = ReactNative;
const styles = StyleSheet.create({
container: {

View File

@ -1,9 +1,11 @@
const React = require('react-native');
const React = require('react');
const {
requireNativeComponent,
Component
Component,
PropTypes
} = React;
const { requireNativeComponent } = require('react-native');
class BlurView extends Component {
render() {
return (
@ -19,7 +21,7 @@ class BlurView extends Component {
}
BlurView.propTypes = {
blurType: React.PropTypes.string,
blurType: PropTypes.string,
};
const NativeBlurView = requireNativeComponent('BlurView', BlurView);

View File

@ -1,9 +1,11 @@
const React = require('react-native');
const React = require('react');
const {
requireNativeComponent,
Component
Component,
PropTypes
} = React;
const { requireNativeComponent } = require('react-native');
class VibrancyView extends Component {
render() {
return (
@ -19,7 +21,7 @@ class VibrancyView extends Component {
}
VibrancyView.propTypes = {
blurType: React.PropTypes.string,
blurType: PropTypes.string,
};
const NativeVibrancyView = requireNativeComponent('VibrancyView', VibrancyView);