useOs

Detect the operating system of the user.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

It is undetermined on the server and on the first render.

APIs

useOs

const useOs = () =>
  | 'undetermined'
  | 'macos'
  | 'ios'
  | 'windows'
  | 'android'
  | 'linux'
  | 'chromeos'
Edit this page on GitHub