Go Main page
Go Main page

Web components

cover

utilities types

useMediaDevice

v.1.0.0 | Saturn
Healthy
Github

Hook used to retrieve the current end user device.

Params

No params are required.

Response

Usage example

12345678910
import { useMediaDevice } from '@kubit-ui-web/react-components';

const MyComponent = () => {
  const device = useMediaDevice();

  return (
    <div>
      <p>The current device is: {device}</p>
    </div>
  );