Closed Lzadhito closed 3 years ago
Hi, you will need to do something like:
useRef
variable to this.xxx
useState
to normal state.useEffect
to componentDidMount
and don't forget to remove the listener in componentWillUnmount
Hi, you will need to do something like:
useRef
variable tothis.xxx
useState
to normal state.useEffect
tocomponentDidMount
and don't forget to remove the listener incomponentWillUnmount
thank you 👍
Any tutorial how to implement it in class component? I'm already write lot of my codes with class component and its kinda hard to implement this while this code written in hooks