DEV Community

loading...

Discussion on: Creating a CRUD app in React with Hooks

Collapse
danielpdev profile image
danielpdev

Great post!
It has a little issue.
It does not work well when you hit twice add user for the same data.

Collapse
vinh2203 profile image
Vinh2203

you can modify the handleSubmit function in AddUserForm.jsx by adding this line
setUser(initUser);

Collapse
sanderdebr profile image
sanderdebr Author

Thanks, I've added a fix for this!