Changed module name from 'ReactNative

Summary:
Platform is in React-Native not React.
Closes https://github.com/facebook/react-native/pull/7718

Differential Revision: D3340334

fbshipit-source-id: 3816f8966bc5b675097182aaf3304d465fbebb95
This commit is contained in:
taelimoh 2016-05-24 08:01:18 -07:00 committed by Facebook Github Bot 1
parent 3d8725dfdb
commit 7113367000

View File

@ -46,7 +46,7 @@ React Native will import the correct component for the running platform.
A module is provided by React Native to detect what is the platform in which the app is running. This piece of functionality can be useful when only small parts of a component are platform specific.
```javascript
var { Platform } = React;
var { Platform } = ReactNative;
var styles = StyleSheet.create({
height: (Platform.OS === 'ios') ? 200 : 100,
@ -59,7 +59,7 @@ There is also a `Platform.select` method available, that given an object contain
returns the value for the platform you are currently running on.
```javascript
var { Platform } = React;
var { Platform } = ReactNative;
var styles = StyleSheet.create({
container: {
@ -94,7 +94,7 @@ var Component = Platform.select({
On Android, the Platform module can be also used to detect which is the version of the Android Platform in which the app is running
```javascript
var {Platform} = React;
var {Platform} = ReactNative;
if(Platform.Version === 21){
console.log('Running on Lollipop!');