UNPKG

react-native-smart-dimension

Version:

A simple and lightweight React Native library for responsive dimensions, scaling, and adaptive UI design.

10 lines (7 loc) 273 B
import { Dimensions, Platform } from "react-native"; export const useDeviceType = () => { const { width, height } = Dimensions.get("window"); const isTablet = Math.min(width, height) >= 600; const platform = Platform.OS; return { isTablet, platform }; };