Skip to content

Instantly share code, notes, and snippets.

View brascene's full-sized avatar
🏠
Working from home

Dino brascene

🏠
Working from home
  • Ministry of Programming
  • Sarajevo
View GitHub Profile
@Shivendra30
Shivendra30 / CachedImage.js
Last active September 22, 2020 22:42
A Image Caching component that I use in react-native show a thumbnail while image is being loaded and also download it to device to allow quick loading the next time
import React, {useState, useEffect} from 'react';
import {
Image,
View,
StyleSheet,
} from 'react-native';
import RNFetchBlob from 'rn-fetch-blob';
import isEmpty from '../../utils/is-empty';
import shorthash from 'shorthash';