---
title: "Discussion on \"Controlled vs uncontrolled forms in React\" | Hashnode"
description: "Discussion on \"Controlled vs uncontrolled forms in React\". The form\nLet's say you have a simple form in React with an input and a button.\nconst submitForm = (e) => {\n  e.PreventDefault();\n  //do something with input\n}\n\nreturn (\n  <form onSubmit={submitForm}>\n    <label htmlFor=\"myInput\">\n    <input id=\"myInp..."
url: "https://hashnode.com/posts/controlled-vs-uncontrolled-forms-in-react/60bb68fdfffc4c13b9cd5d27"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Controlled vs uncontrolled forms in React](https://blog.nicm42.me.uk/controlled-vs-uncontrolled-forms-in-react?utm_source=hashnode&utm_medium=feed)

The form Let's say you have a simple form in React with an input and a button. const submitForm = (e) => { e.PreventDefault(); //do something with input } return ( <form onSubmit={submitForm}> <label htmlFor="myInput"> <input id="myInp...

Jun 5, 2021 · 3 min read · blog.nicm42.me.uk  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#forms](https://hashnode.com/tag/forms)

## Written by

[Nic](https://hashnode.com/@nicm42)

@nicm42 · England

  
[View profile](https://hashnode.com/@nicm42)

This week I learnt...

Front End Developer. I like problem solving and making things pretty. I also like red.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
