I want to make simple messaging using socket.io and react useEffect() for a setup but I have no idea on how to properly manage/update state from inside of
useEffect()