How to organize react query project
I have question about organizing react query, currently I have folder
services with folders like users, posts, and there is file for server data fetching functions called api.ts, and another file for queries and mutations (queriesAndMutations.ts)
would it be better solution to rename api.ts for example for posts, to postService, make it file that exports postService = new class postService, and there store all api calls as methods2 Replies
equal-aquaOP•2y ago
something like this
equal-aquaOP•2y ago
or maybe keep api.ts
so the project structure would be
