Skip to content

Instantly share code, notes, and snippets.

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

Ehsan sarshar byteab

🏠
Working from home
View GitHub Profile
@byteab
byteab / 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
*/
@byteab
byteab / 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 }>(