npm.io
1.0.0 • Published 5 years ago

@sk39/expo-image-cache

Licence
MIT
Version
1.0.0
Deps
2
Size
36 kB
Vulns
0
Weekly
0

expo-image-cache

Image Cache for React Native Expo.

20201008_190924

Install

npm install @sk39/expo-image-cache

Usage

Props
Props Default Description
source - ImagSource
backgroundColor '#e9eaf8'
onLoaded null
onError null
CacheImage
import React, { Component } from 'react'
import {CacheImage} from "@sk39/expo-image-cache"

class Example extends Component {
  render () {
    const source = {uri: "https://picsum.photos/510/300?random"}
    return (
        <View style={{width: 100, height: 60}}>
            <CacheImage source={source}/>
        </View>
    )
  }
}
Clear cache
import {ImageStore} from "@sk39/expo-image-cache";

await ImageStore.getInstance().clear()

License

MIT sk39

Keywords