reactnative-position-mixin
v1.0.0
Published
Mixin for get position in state
Downloads
3
Readme
This Mixin define a state Position for your component
Install
$ npm i --save reactnative-position-mixin
Usage
import React from 'react';
import { View, Text } from 'react-native';
import PositionMixin from 'reactnative-position-mixin';
const MyComponent = React.createClass({
mixins: [ PositionMixin ],
render() {
return (
<View>
<Text>{ this.state.Position ? this.state.Position.longitude : 'Unknown longitude' }</Text>
<Text>{ this.state.Position ? this.state.Position.latitude : 'Unknown latitude' }</Text>
</View>
);
}
});