Package Exports
- react-native-responsive-image
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-responsive-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Native Responsive Image
React Native
##Why?
React Native
##Usage
npm install
All you need to do is download the component's code, require the component and then set it's initWidth and initHeight props.
These values are used as they are on iPhone6 Plus, and they are scaled down for iPhone4/5/6.
##Example
var React = require('react-native');
var ResponsiveImage = require('./ResponsiveImage');
var {
AppRegistry,
StyleSheet,
View,
} = React;
var ResponsiveImage = React.createClass({
render: function() {
return (
<View style={{flex: 1, justifyContent: 'center',}}>
<ResponsiveImage source={{uri: 'http:' + item.profile_picture.href}} initWidth="80" initHeight="80" item={item} />
</View>
);
}
});
AppRegistry.registerComponent('AwesomeProject', () => ResponsiveImage);
##Todo
- iPad version