TipWhile this hook is convenient, for simple layout changes, consider using CSS Media Queries first to avoid the "flash of unstyled content" (FOUC) during the initial hydration.
A responsive utility hook that monitors window resizing and returns a boolean state indicating if the current screen width is greater than or equal to a provided pixel value. It leverages useScreenSize for centralized event listening.
| Name | Type | Description |
|---|---|---|
| width | number | The minimum pixel width to consider the device as 'desktop'. Default: 0 |
| Name | Type | Description |
|---|---|---|
| isDesktop | boolean | true if the current viewport width ≥ the parameter width. |