79303073

Date: 2024-12-23 12:32:45
Score: 1
Natty:
Report link

no you should not use an empty array as a dependency but you can include the socket so that the useEffect runs only when something happens on the socket.Thatshow I did mine and it worked very well.

useEffect(()=>{

},[socket])

Reasons:
  • Whitelisted phrase (-1): it worked
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: TWESIGYE FAHAD