This article will be useful to you if you are like me who doesn't rely much on third party libaries. Let's begin:
I will be using a mini project for this demo.
1. Create a new react app using vite or CRA but I will be making use of Typescript.
2. In the service folder we added the API service client.
3. In the hooks folder we make use of the API Client we created earlier.
4. And finally we make use of our custom hook in our components.
This is not a principle but a concept you can apply in your project.
Top comments (0)