The element to attach the event listener to, can be window, document, or an HTML element.
The event type (same as for addEventListener).
The function to call when an event occurs (same as for addEventListener).
Options for the event listener (same as for addEventListener, with additional disabled and
rateLimitMS).
Adds an event listener to the given target element and removes the listener before unmount.