From 4eec4b6f32e9807043430462a2ffe4e03f80ad8c Mon Sep 17 00:00:00 2001 From: Jeduan Cornejo Date: Tue, 10 May 2016 13:10:36 -0500 Subject: [PATCH] Splits react-native and react to avoid warnings on >= 0.25 --- lib/radio-buttons.js | 5 +++-- lib/segmented-controls.js | 5 +++-- package.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/radio-buttons.js b/lib/radio-buttons.js index ee33d8a..a47afa1 100644 --- a/lib/radio-buttons.js +++ b/lib/radio-buttons.js @@ -1,11 +1,12 @@ 'use strict'; -var React = require('react-native'); +var React = require('react'); +var ReactNative = require('react-native'); const { Text, TouchableWithoutFeedback, View, -} = React; +} = ReactNative; const propTypes = { options: React.PropTypes.array.isRequired, diff --git a/lib/segmented-controls.js b/lib/segmented-controls.js index fdd1fe0..c88d110 100644 --- a/lib/segmented-controls.js +++ b/lib/segmented-controls.js @@ -1,5 +1,6 @@ 'use strict'; -import React from 'react-native'; +import React from 'react'; +import ReactNative from 'react-native'; import RadioButtons from './'; const { @@ -7,7 +8,7 @@ const { TouchableWithoutFeedback, View, Platform -} = React; +} = ReactNative; class SegmentedControls extends React.Component { diff --git a/package.json b/package.json index d72e747..db73933 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "url": "git@github.com:ArnaudRinquin/react-native-radio-buttons.git" }, "peerDependencies": { - "react-native": ">=0.8.0" + "react-native": ">=0.25.0" }, "keywords": [ "react-component",