From the course: Building Full-Stack Apps with React and Spring

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Connect the add contact form to server

Connect the add contact form to server

From the course: Building Full-Stack Apps with React and Spring

Start my 1-month free trial

Connect the add contact form to server

- [Instructor] Okay, so now let's continue working on our add contact file. So the first thing we're going to do is keep working on our little component here and then go back up and create the function that we need to submit the form. So the first thing that I'm going to do is add the actual onsubmit function here. So let's go ahead and do that. And we're going to create this function shortly and it's called submit contact and we need to bind it to this. Okay. Now the next thing we're going to do is kind of of reorganize this a little bit and on the same token, make sure we have all the reference inside of that form. So we're going to change the id to ref. You want to do this on every ids like so. And then also for the for, it needs to be htmlfor, so let's change that as well. We'll do it here as well. Okay. So now that we've got that and let me just organize this a little bit so it looks cleaner,…

Contents