Javascript – how to avoid react usestate rendering duplicate?
my usesate why rendering two times? I used [] at the end of the usestate so it should render once but it fetching data two times which gives me a duplicate render. useEffect(() => { const socket = io("http://localhost:3001"); let…