Vev projects can be custom-designed for various presentation modes such as desktop, tablet, or mobile. useDevice()
returns the currently active mode ('desktop
' | 'tablet
' | 'mobile
').
Usage
const device: string = useDevice();
Example
import ( useDevice ) from 'vev;
export default function () {
const device:'desktop'|'tablet'|'mobile' = useDevice();
return <h1> Device: {device} </h1>
}