Should I use setState inside useEffect with React Query (or TRPC)?
Lets say I want to fetch a product and set the result to a zustand store.
Since tkdodo mentions we shouldn't be using onSuccess (it will be deprecated fully soon), is the only approach to just add:
Is there a better way to approach this?
TkDodo article:
https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose
Since tkdodo mentions we shouldn't be using onSuccess (it will be deprecated fully soon), is the only approach to just add:
Is there a better way to approach this?
TkDodo article:
https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose
Why good API design matters, even if it means breaking existing APIs in the face of resistance.
