An example repo I used to teach a React Query workshop
It's an example repo that show show to go from a simple hook-based application to React Query, avoiding all of the "global state" madness that normally happens!
main
branch contains the initial code we started withwith-react-query
branch contains the code we ended with after adding react-query
useQuery
useMutation
queryCache.prefetchQuery
ORinitialData
to show placeholder content for individual posts that pull from the parent posts
queryreact-query/hydration
APIsyarn
and then yarn dev
locally.