@sk39/expo-image-cache
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i @sk39/expo-image-cache

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

37.3 kB

Total Files

19

Last publish

Collaborators

  • sk39