Reactjs – React Query response data on useState "initialization value"
I want to put the "data" from the useQuery response as the initial value of my component. const {data, isLoading } = useQuery({ queryKey: ["name", nameId], queryFn: async () => { const consulta = await getFetch(NAME_URI + "/" + nameID);…