react-native-no-flicker-image
Version:
React Native image component without flicker
33 lines (27 loc) • 788 B
Markdown
React native `Image` component without flicker
on `android` devices when `source` is changed.
Show previous image until new one is loaded. Support all [Image](https://facebook.github.io/react-native/docs/image) props.
```
npm install react-native-no-flicker-image
```
```
import { NoFlickerImage } from 'react-native-no-flicker-image';
export default class DisplayAnImage extends Component {
render() {
return (
<View>
<NoFlickerImage
source={require('/react-native/img/favicon.png')}
/>
<NoFlickerImage
style={{width: 50, height: 50}}
source={{uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}}
/>
</View>
);
}
}
```