Built a demo
This is a little React TODO app that shows steps by step how to migrate using hooks to manage the server state to react-query starting by adding react-query and setting up, add `useQuery` usage, then `useMutation`,and finally using optimistic updates

Running app here
Demo Code on github: https://github.com/matiasfha/react-query-example