Skip to content

Commit ad8fca9

Browse files
authored
Update forms-in-react.md
1 parent c46b82d commit ad8fca9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/react/getting-started/forms-in-react.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
id: forms-in-react
33
title: Forms in React
4-
sidebar_label: Forms in React
54
tags: [react, forms, frontend, web development, tutorial]
65
description: Learn how to handle forms in React comprehensively with examples covering controlled components, uncontrolled components, textarea, select, file input, and more. This extensive guide covers theory, usage, features, examples, best practices, alternatives, and advanced techniques.
6+
hide_table_of_contents: true
77
---
88

99
You add a form with React like any other element:
@@ -441,4 +441,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
441441
root.render(<MyForm />);
442442
```
443443

444-
In this example, we're using the `useState` hook to manage the input field's value. The `name` state variable holds the value of the input field, and the `setName` function updates this state whenever the input field changes. This ensures that the input field's value is always controlled by React's state, providing a single source of truth for the form data.
444+
In this example, we're using the `useState` hook to manage the input field's value. The `name` state variable holds the value of the input field, and the `setName` function updates this state whenever the input field changes. This ensures that the input field's value is always controlled by React's state, providing a single source of truth for the form data.

0 commit comments

Comments
 (0)