Hey there! Could you please provide a video explaining how to write better services? Currently, I create hooks for different types of API calls (such as UseOrders to get, edit, delete, and add orders). However, I feel that this approach might be flawed. Additionally, I would like to know how to handle filters effectively. I have multiple filters that can be active at different or the same times, like "?search=gold&status=delivered" or "?search=gold". What would be the best way to handle these filters dynamically? Please check the grammar and spelling of this paragraph.
For props I prefer types over interface and do not export it unless I really need it. If the type is not exported it is fine to define type Props instead of type SomeSpecificProps
my preferences, all filename usin "-", i like about-us.tsx. because nextjs using "-" based for pages filename. and easy to read too. but each component, will be PascalCase.
For my API calls I have a folder titled "api" and inside a file axios.ts. I declare and export all of my axios calls to be used somewhere else in the program. I also make a folder specifically for forms since they can be pretty lengthy when you add validation like zod and react form hook. Do you think that's bad naming convention?
Hello! I have noticed that you wrote your types files with .d.ts and that is not correct. Matt Pocock has a good explination why is bad to name types files with d.ts
Really good explanation, I like your style! Do you happen to have the code you are showing in your video in a public github repo?
Man, This is the most underrated channel I have ever seen. Cool contents
Thanks, keep posting videos like this
Hey there! Could you please provide a video explaining how to write better services? Currently, I create hooks for different types of API calls (such as UseOrders to get, edit, delete, and add orders). However, I feel that this approach might be flawed. Additionally, I would like to know how to handle filters effectively. I have multiple filters that can be active at different or the same times, like "?search=gold&status=delivered" or "?search=gold". What would be the best way to handle these filters dynamically? Please check the grammar and spelling of this paragraph.
Really helpful.
Good luck
For props I prefer types over interface and do not export it unless I really need it. If the type is not exported it is fine to define type Props instead of type SomeSpecificProps
my preferences, all filename usin "-", i like about-us.tsx. because nextjs using "-" based for pages filename. and easy to read too. but each component, will be PascalCase.
For my API calls I have a folder titled "api" and inside a file axios.ts. I declare and export all of my axios calls to be used somewhere else in the program. I also make a folder specifically for forms since they can be pretty lengthy when you add validation like zod and react form hook. Do you think that's bad naming convention?
As the always valuable video Can you share your ESLint Rules file
I like your videos
Why do you use an assets and a public folder? How do you decide to put the assets in one or the other folder?
Hello! I have noticed that you wrote your types files with .d.ts and that is not correct. Matt Pocock has a good explination why is bad to name types files with d.ts
what color theme do you use in vscode?