1.0.0 • Published 4 years ago

@sk39/expo-image-cache v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

expo-image-cache

Image Cache for React Native Expo.

20201008_190924

Install

npm install @sk39/expo-image-cache

Usage

Props

PropsDefaultDescription
source-ImagSource
backgroundColor'#e9eaf8'
onLoadednull
onErrornull

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