use-window-event
Adds event listener to window on component mount and removes it on unmount
Import
Source
Docs
Package
Usage
use-window-event adds event listener to window object on component mount and removes it on unmount:
Example
Search focus with ⌘ + K
on mac or Ctrl + K
on windows and linux on Mantine docs website:
Definition
Hook has exact same definition as window.addEventListener
function:
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback