Open bharat-dussa opened 2 months ago
i am interested @bharat-dussa pls assign me to this issue
Okay
I would like to work on this issue. Can you please assign this to me?
I would like to work on this issue. Can you please assign this to me?
Already assigned to @Laxman8261 , please pick another one
useEventListener
Description: A hook that simplifies adding and removing event listeners on a specified target (e.g., a DOM element or the
window
object). This is useful for handling events like clicks, key presses, and resizing in a functional component.Parameters:
eventType: string
– The type of the event to listen for (e.g.,"click"
,"resize"
,"scroll"
).handler: (event: Event) => void
– The callback function to be called when the event is triggered.target: EventTarget | null
(optional) – The target to which the event listener should be attached. Defaults towindow
.Returns:
void
– No return value.Example: