Is useEffect the best way to handle changes in data?
I have data that can change on the server and when it does I want certain things to happen in the app (such as opening a popup).
I am currently handling this like this:
Is this the best way to achieve the idea of "onSuccess only for one instance" or is there some better way?
1 Reply
secure-lavender•3y ago
having https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose in mind this does seem like the way to go
Breaking React Query's API on purpose
Why good API design matters, even if it means breaking existing APIs in the face of resistance.