react-native-remote-image-view v0.6.0
react-native-remote-image-view
Thin wrapper around PINRemoteImage, a thread safe, performant, feature rich image fetcher for iOS.
DISCLAIMER
This project is currently in beta.
Core APIs are subject to change. We encourage people to try this library out and provide us feedback as we get it to a stable state.
Installation
iOS
Only installation via CocoaPods is supported.
$ npm install react-native-remote-image-view --save
- Add the following lines to your Podfile relative to your
node_modules
path:
pod 'PINRemoteImage', :git => 'https://github.com/Pinterest/PINRemoteImage.git', :tag => '3.0.0-beta.13'
pod 'MSRRemoteImageView', path: '../node_modules/react-native-remote-image-view/MSRRemoteImageView.podspec'
pod install
- Build and run your app either in Xcode or via the React Native cli.
Android
On Android react-native-remote-image-view
is a shim around the default Image
component. We are currently investigating the best way to provide Android support.
Usage
For different usage examples look into the example folder.
import RemoteImageView from 'react-native-remote-image-view';
export default class DisplayAnImage extends Component {
render() {
const imageURL = ...;
return (
<View>
<RemoteImageView
imageURL={imageURL}
style={styles.imageView}
/>
</View>
);
}
}
TODO:
- API refinements
- Android support
License
Copyright 2017-present Michael Schneider
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.