Submitting the Form

It's time to create another action so that our screen can be updated with the new message, but is that all we need to do? Let's find out.

We'll cover the following...

Right now, when you type a message and hit enter, it doesn’t show up in the conversation list, and the page reloads.

Terrible!

Let’s handle the form submission.

In MessageInput.js, add a handleSubmit event handler as shown below:

Access this course and 1400+ top-rated courses and projects.