useEffect and useQuery

I am trying to useEffect with useQuery. My purpose is removing item from collection when someone clicks the delete button. I do not want to refresh page, so i have to use useEffect. I tried something like that, but no change. Do you have any idea about how i can do that?
Captura_de_pantalla_2023-06-24_a_las_23.05.16.png
Captura_de_pantalla_2023-06-24_a_las_23.05.59.png
Was this page helpful?