DEV Community

Discussion on: Creating a CRUD app in React with Hooks

Collapse
 
austejakazlauskyte profile image
Austeja Kazlauskyte

A million thanks for your reply.

I solved the issue by myself. Apparently, I wrote the functions but did not insert the onClick method on the button, to trigger everything.
A beginner mistake.

Thank you for a great tutorial, it made it very easy for me to understand how to do CRUD with React.

And to be honest - through you, I found Skeleton and immediately fell in love with this framework. I am definitely going to use it in the future when I need smth fast to bootstrap my small coding projects.

Thread Thread
 
austejakazlauskyte profile image
Austeja Kazlauskyte

Hey, another question if you may - how would you fetch data from an API?
Would you just replace the data.js file with a function that receives data using Hooks, or would you recommend something else? Thank you!

Thread Thread
 
sanderdebr profile image
sanderdebr

Hi, thanks for the suggestion I've just added a Bonus section where I explain how to fetch user data from an API. I think it is a very helpful addition to this tutorial.

The way I did it might be a bit hard to understand, there are easier ways to fetch data in React but in this way you'll also learn about custom hooks :)

Also, I've added a little update for adding multiple users with the same data.

Thread Thread
 
austejakazlauskyte profile image
Austeja Kazlauskyte

That is amazing, thanks! ⭐️💜👍🏻