{"id":15414343,"url":"https://github.com/tannerlinsley/react-query-blog-demo","last_synced_at":"2025-10-24T10:02:07.119Z","repository":{"id":48562200,"uuid":"303048851","full_name":"tannerlinsley/react-query-blog-demo","owner":"tannerlinsley","description":"An example repo I used to teach a React Query workshop","archived":false,"fork":false,"pushed_at":"2021-07-20T10:18:08.000Z","size":131,"stargazers_count":99,"open_issues_count":2,"forks_count":58,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T18:27:48.020Z","etag":null,"topics":["react-query","workshop"],"latest_commit_sha":null,"homepage":"react-summit-2020-react-query.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tannerlinsley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-11T05:25:41.000Z","updated_at":"2025-04-15T06:29:20.000Z","dependencies_parsed_at":"2022-08-21T10:40:17.488Z","dependency_job_id":null,"html_url":"https://github.com/tannerlinsley/react-query-blog-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tannerlinsley/react-query-blog-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Freact-query-blog-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Freact-query-blog-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Freact-query-blog-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Freact-query-blog-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tannerlinsley","download_url":"https://codeload.github.com/tannerlinsley/react-query-blog-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tannerlinsley%2Freact-query-blog-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275447296,"owners_count":25466564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-query","workshop"],"created_at":"2024-10-01T17:02:43.356Z","updated_at":"2025-09-16T16:09:38.949Z","avatar_url":"https://github.com/tannerlinsley.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is this?\n\nIt'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!\n\n- The `main` branch contains the initial code we started with\n- The `with-react-query` branch contains the code we ended with after adding `react-query`\n- The #2 PR currently open in the repo shows the changes between the two\n\n## Challenges\n\n- Convert the custom hooks used to fetch data to use `useQuery`\n- Implement per-screen background fetching indicators\n- Convert the custom hooks used to create/update/delete to use `useMutation`\n- Configure mutations to automatically invalidate related queries\n- Implement optimistic updates for mutations\n- Prefetch individual posts on hover using `queryCache.prefetchQuery` OR\n- Use `initialData` to show placeholder content for individual posts that pull from the parent `posts` query\n- Remove per-screen background fetching indicators and instead build a global refetching indicator\n- Dehydrate/hydrate the cache to and from localStorage using the `react-query/hydration` APIs\n\n## How do I develop on this?\n\n- Run `yarn` and then `yarn dev` locally.\n- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n- **NOTE:** The \"database\" used in this app is simply a JSON file and thus will not work as a deployed application. That said, you are more than welcome to hook it up to a real API if you want!\n\n## Why Next.js?\n\n[Read This 😁](https://gist.github.com/tannerlinsley/65ac1f0175d79d19762cf06650707830)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannerlinsley%2Freact-query-blog-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftannerlinsley%2Freact-query-blog-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftannerlinsley%2Freact-query-blog-demo/lists"}