mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Replace custom useApi hook with @tanstack/react-query across all 14 pages and InstallForm. Add react-virtuoso VirtuosoGrid to SkillsPage for handling 46K+ skills without freezing the browser. Key changes: - Add queryClient with shared defaults (staleTime, gcTime, retry) - Add centralized queryKeys factory for prefix-based invalidation - Wire QueryClientProvider + ReactQueryDevtools in App.tsx - Migrate AppContext to useQuery (shares cache with DashboardPage) - Migrate all pages: useApi → useQuery, handlers → invalidateQueries - SkillsPage grid view: VirtuosoGrid with useWindowScroll, overscan, ScrollSeekPlaceholder, and React.memo on card components - Add resolve.dedupe for React to prevent duplicate instance in dev - Add vendor-tanstack-query manual chunk for build splitting - Delete unused useApi.ts hook
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"name": "ui",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"lint": "eslint .",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/lang-javascript": "^6.2.4",
|
|
"@codemirror/lang-json": "^6.0.2",
|
|
"@codemirror/lang-python": "^6.2.1",
|
|
"@codemirror/lang-yaml": "^6.1.2",
|
|
"@codemirror/view": "^6.39.12",
|
|
"@tailwindcss/vite": "^4.1.18",
|
|
"@tanstack/react-query": "^5.90.21",
|
|
"@uiw/react-codemirror": "^4.25.4",
|
|
"lucide-react": "^0.563.0",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-router-dom": "^7.13.0",
|
|
"react-virtuoso": "^4.18.1",
|
|
"remark-gfm": "^4.0.1",
|
|
"tailwindcss": "^4.1.18"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.1",
|
|
"@tanstack/react-query-devtools": "^5.91.3",
|
|
"@types/node": "^24.10.1",
|
|
"@types/react": "^19.2.5",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^5.1.1",
|
|
"eslint": "^9.39.1",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
"globals": "^16.5.0",
|
|
"typescript": "~5.9.3",
|
|
"typescript-eslint": "^8.46.4",
|
|
"vite": "^7.2.4"
|
|
}
|
|
}
|