Detects the current device type based on the window width.
"mobile" | "tablet" | "desktop" depending on window width.
"mobile" | "tablet" | "desktop"
const device = getDeviceType();console.log(device); // "mobile", "tablet", or "desktop" Copy
const device = getDeviceType();console.log(device); // "mobile", "tablet", or "desktop"
1.1.0
Detects the current device type based on the window width.