not gonna lie this is driving me nuts well. Im working on a React app and noticed that a useEffect that fetches data runs twice when the component mounts... the network tab shows two identical requests. in the production build it only happens once.
useEffect(() => {
fetch("/api/items").then(r => r.json()).then(setItems);
}, []);
Is this something i broke?? Should i add a flag to stop teh second call? pls help 🙏