Quick question about forms in react

Okay, so, I’m trying to make it so that there is an input field, and the user can input a title into the input field, and then when they hit enter, whatever they typed is displayed as an <h1>, but whenever I hit enter after typing something in the input field, it just refreshes the page. :confused:

See the following Medium article on the subject.

I read that article previous to posting this. It doesn’t seem to really answer my specific issue.