DEV Community

Discussion on: Fetching data and creating a custom hook. 🪝

Collapse
 
lweiner profile image
Lukas Weiner

That's a great post, really appreciate the effort. What is the approach if you fetch from different urls, how can I make the data type dynamic?
I really struggled with that while I build my own custom fetch Hook.

Collapse
 
franklin030601 profile image
Franklin Martinez

Thank you very much 🤗. And yes, making data requests using hooks is a bit tricky at first, but with time you learn to improve your logic 🤲.