how to update query data without useEffect
Hi I'm using Redux and React-Query
and i want update response data when api call succeed
when i use onSuccess call back it's work but i read onSuccess is not good so i try
and stuck in an endless loop
i don't wan't use useEffect so what should i do?
shuld i use query-key? or cache?
and i want update response data when api call succeed
when i use onSuccess call back it's work but i read onSuccess is not good so i try
and stuck in an endless loop
i don't wan't use useEffect so what should i do?
shuld i use query-key? or cache?