Skip to main content

useMediaQuery

Overview​

The useMediaQuery() is a custom hook used to determine if the current viewport matches a given media query.

Usages​

To utilize the useMediaQuery() hook, please refer to the example provided below:

Example​

/use-media-query

Example screen size is larger than 800px

Source Code​