Solutionunvalidated
I try putting a setName(data.name) inside a useEffect that runs only when "isLoading" changes, and it works — edit/change the "name" retrieved by the query. Tension: I would think there is a better and more clean way to do it. Outcome: use a `useEffect` hook to "synchronize" a React state to an external source.
0b4e210b-4ee5-485a-b884-25efb830ad01
I try putting a setName(data.name) inside a useEffect that runs only when "isLoading" changes, and it works — edit/change the "name" retrieved by the query. Tension: I would think there is a better and more clean way to do it. Outcome: use a useEffect hook to "synchronize" a React state to an external source.