Reactjs – Invalid hook call when making a reusable fetch function
I'm trying to make reusable GET and POST requests, but I'm getting error Invalid hook call when setting the data state in the reusable fetch request component. I've just learnt that we can only use hooks in React components, so…