{"id":43620540,"url":"https://github.com/egeuysall/learn-tanstack","last_synced_at":"2026-02-04T13:01:48.846Z","repository":{"id":319398727,"uuid":"1078584852","full_name":"egeuysall/learn-tanstack","owner":"egeuysall","description":"Learn. Fetch. Mutate","archived":false,"fork":false,"pushed_at":"2025-11-22T14:53:09.000Z","size":123,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-22T16:29:19.698Z","etag":null,"topics":["backend","frontend","javascript","learn","tanstack-query","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egeuysall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-18T01:47:13.000Z","updated_at":"2025-11-22T14:53:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"55e065ab-ebe1-4b39-8192-71567a6f4dbb","html_url":"https://github.com/egeuysall/learn-tanstack","commit_stats":null,"previous_names":["egeuysall/learn-tanstack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/egeuysall/learn-tanstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Flearn-tanstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Flearn-tanstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Flearn-tanstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Flearn-tanstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egeuysall","download_url":"https://codeload.github.com/egeuysall/learn-tanstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egeuysall%2Flearn-tanstack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29085068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["backend","frontend","javascript","learn","tanstack-query","typescript"],"created_at":"2026-02-04T13:01:00.350Z","updated_at":"2026-02-04T13:01:48.840Z","avatar_url":"https://github.com/egeuysall.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn TanStack Query\r\n\r\nA hands-on learning project built to master state management with Zustand and server state with TanStack Query.\r\n\r\n## What I Learned\r\n\r\n### Zustand\r\n- Basic state management with `set` and `get`\r\n- Persistent state with `persist` middleware\r\n- Store communication (stores talking to each other)\r\n- When to use Zustand vs useState vs TanStack Query\r\n- Performance optimization with `useShallow`\r\n\r\n### TanStack Query\r\n- Fetching data with `useQuery`\r\n- Mutations (POST/PUT/DELETE) with `useMutation`\r\n- Cache invalidation with `invalidateQueries`\r\n- Loading and error states\r\n- Query keys for caching and refetching\r\n- Pagination with dynamic query keys\r\n\r\n### Architecture Decisions\r\n- **TanStack Query** → Server state (API data, caching)\r\n- **Zustand** → Client state (UI state, pagination, preferences)\r\n- **useState** → Local/temporary state (forms, modals)\r\n\r\n## Project Features\r\n\r\n- Blog listing with pagination\r\n- Admin panel to create new blogs\r\n- Real API integration with JWT authentication\r\n- Automatic cache updates after mutations\r\n\r\n## Tech Stack\r\n\r\n- Next.js 15\r\n- TypeScript\r\n- TanStack Query\r\n- Zustand\r\n- Tailwind CSS\r\n\r\n## Key Takeaways\r\n\r\n- State management isn't one-size-fits-all\r\n- Use the right tool for the right job\r\n- Server state ≠ Client state\r\n- Performance matters (useShallow, proper selectors)\r\n- Environment variables for secrets (never commit tokens!)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeuysall%2Flearn-tanstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegeuysall%2Flearn-tanstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegeuysall%2Flearn-tanstack/lists"}