web-api-hooks
Version:
Essential set of React Hooks for convenient Web API consumption.
15 lines (14 loc) • 413 B
TypeScript
/**
* Tracks visual viewport scale.
*
* ⚗️ _The underlying technology is experimental. Please be aware about browser compatibility before using this in production._
*
* @returns Pinch-zoom scaling factor, falling back to `0` when unavailable.
*
* @example
* function Component() {
* const viewportScale = useViewportScale();
* // ...
* }
*/
export default function useViewportScale(): number;