Skip to content

useOperatingSystem ​

Hook that returns the operating system of the current browser

browser
test coverage
Last changed: last month

Installation ​

Library
CLI
Manual
typescript
import { useOperatingSystem } from '@siberiacancode/reactuse';

Usage ​

typescript
const operatingSystem = useOperatingSystem();

Demo ​

Api ​

Returns

OperatingSystem

Type declaration ​

typescript
export type OperatingSystem = 'android' | 'ios' | 'linux' | 'macos' | 'undetermined' | 'windows';

Source ​

Source • Demo

Contributors ​

D
debabin
debabin
H
hywax
hywax

Released under the MIT License.