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
flat-fuchsiaOP•15mo ago
something like this
flat-fuchsiaOP•15mo ago
or maybe keep api.ts
so the project structure would be
