JamesReviewsMusic
JRM-46Query key factory and queryClient hygiene
Description
Query keys are inline strings scattered across routes, hooks and components (["albums", options], ["albumReview", id], ["home"], ["artistID", id]...), and AdminDropdown reads the cache with a locally re-declared shape that's already drifted from the real one. Components also import queryClient directly from main.tsx, which creates an import cycle (main -> routes -> components -> main).
- Add a typed queryKeys factory module and replace every inline key
- Replace queryClient imports from @/main with the useQueryClient() hook
- Invalidations go through the factory so related keys stay consistent
Sub-tickets
0No sub-tickets yet.
Links
No links.
Comments
0No comments yet.