I am using reactJs to fetch data from firebase realtime. But when i run this code, it keep fetching the same data over and over again. How can i solve this?
enter image description here
enter image description here
>Solution :
Out of your error in the image, I think you have to add a dependency array in your useEffect like this:
useEffect(() => {
// Code here
}, [])