[Section Fetching and Updating Data with React Query : Video 32]
About halfway through this course, Mosh creates a file for fetching the JSON data associated with a Genre (and another for Platform). I’m wondering why we wouldn’t put the “useGenre” hook component into the useGenres.ts file, thus keeping Genre getting components together.
I understand that good React design is all about creating small components that do specific tasks, but I’m also thinking that with a larger project, the hooks folder might be overwhelming. Or when the project grows, should additional folders be added inside the hooks folder to keep similar component files together - eg. hooks → GenreHooks → useGenre.ts & useGenres.ts
OR, is this a case by case situation where you try to do the course’s approach for smaller projects and if they grow large, combine the Genre getting components at that point?