I want to know how to fetch data just on the first load of component and not on every reload.
I hope that is making sense.
so something like that will be calling in every load
useEffect(() => getData(), []);
For example : I want to fetch the data for the pieces when the user click on pieces section not before. see the picture.
enter image description here