Custom hooks for fetching and storing data on a mass scale
Unanswered
West African Lion posted this in #help-forum
West African LionOP
Hey all, i’m making a game hosting panel. This relys super heavily on my multiple REST apis. Can someone direct me to a good guide/example of custom hooks and combining them with fetching data please? Could i combine tanstack query with a custom hook? Currently im using custom hooks with axios and zustand. How big should a hook be?
4 Replies
West African LionOP
i am worried i am not properly programming in the most efficient way
West African LionOP
Im learning about useContext right now, would this be better than Zustand? Take something like my file manager. I need to manage current directory, current file, existing files, is it an certain type of file with custom support, etc
West African LionOP
Here’s an example
i have renaming, archiving, deleting, moving, creating a new file. How should i split this up? How many hooks should i make to handle all of this? Should I do one hook per API call and just wrap over tanstack query?