Will be able to add event listeners and will be able to intercept the event
npm install --save @swaraj0_0/add-event-listener-hook
import React, { Component } from 'react'
import { useAddEventListeners } from '@swaraj0_0/add-event-listener-hook'
const Example = () => {
const userName = 'SwarajGK';
const { loading, userData } = useAddEventListeners(userName)
return (
<div></div>
)
}
MIT © @SwarajGK
This hook is created using create-react-hook.