Skip to content

Instantly share code, notes, and snippets.

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

Ehsan sarshar TheEhsanSarshar

🏠
Working from home
View GitHub Profile
@TheEhsanSarshar
TheEhsanSarshar / middleware.ts
Last active June 3, 2021 16:31
persist middleware catch implemented correctly
import {
GetState,
PartialState,
SetState,
State,
StateCreator,
StoreApi,
} from './vanilla'
export const redux = <S extends State, A extends { type: unknown }>(
@TheEhsanSarshar
TheEhsanSarshar / ReactNativeResponsiveUtilities.ts
Last active September 1, 2022 11:36
React Native Responsive Utility Functions
import { Dimensions } from 'react-native';
const { height: screenHeight, width: screenWidth } = Dimensions.get('window');
const EACH_HEIGHT_UNIT = screenHeight / 100
const EACH_WIDTH_UNIT = screenWidth / 100
/**
* device height percentage
*/