A specialization of React.useEffect which executes f with the event data whenever ev fires. If key is provided, f is only invoked on events fired with that key.
f
ev
key
Optional
A specialization of React.useEffect which executes
fwith the event data wheneverevfires. Ifkeyis provided,fis only invoked on events fired with that key.