Skip to content

Instantly share code, notes, and snippets.

View Shivendra30's full-sized avatar

Shivendra Nath Misra Shivendra30

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';
html{
font-size: calc(1vw + 1em)/2;
}
.some-random-input{
font-size: 2em; /*Twice the size defined above*/
}