1.0.6 • Published 4 months ago

@patosala/photobook v1.0.6

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

Photobook

A react-native component to save and load images from cache.

Quick Links

Installation

npm install rn-image-cache

Usage

import { View, StyleSheet } from 'react-native';
import { CachedImage } from '@patosala/rn-image-cache';

export default function App() {
	const url = 'https://example/image.jpg';

	return (
		<View style={styles.container}>
			<CachedImage 
				source={{ uri: url }}
				style={styles.picture}
			/>
		</View>
	)
}

const styles = StyleSheet.create({
	container: {
		flex: 1
	},
	picture: {
		width: '100%',
		aspectRatio: '1/1'
	}
})

Features

FeatureStatus
Save pictures to cache
Clear old pictures from cache❌ (In progress)
Custom loading component❌ (In progress)
Event handler when image has been loaded (for dev purposes such as confirming if image has been loaded from cache or from a remote source)❌ (In Progress)

If you think some features are missing, make an issue and let me know!

1.0.6

4 months ago

1.0.5

4 months ago