Custom hooks structure
I'm trying to figure out what is a good structure to use for my api, previously a had all those mutation/query hooks in their own
usePaginateApi
for all my resources which resulted in a mess what usePaginateApi
to import. Now I'm trying something new and was thinking about this example below, what are you thoughts? Any better idea's :-)?
2 Replies
eastern-cyan•2y ago
how I use is put the queryFn or mutationFn in a different folder api/
extended-salmonOP•2y ago
That is what I did as well but it is kinda hard with the language server to import the correct one as all of these functions have the same name.
