dev:reactform
Différences
Ci-dessous, les différences entre deux révisions de la page.
| dev:reactform [2021/12/28 14:04] – créée sbestel | dev:reactform [2021/12/28 14:36] (Version actuelle) – sbestel | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ====== utilisation d'une REF ====== | ||
| Ligne 7: | Ligne 8: | ||
| console.log(this.clientimput.current.value); | console.log(this.clientimput.current.value); | ||
| | | ||
| + | |||
| | | ||
| <form onSubmit={this.handlesubmit}> | <form onSubmit={this.handlesubmit}> | ||
| Ligne 12: | Ligne 14: | ||
| < | < | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ====== utilisation d'une state ====== | ||
| + | |||
| + | state = { | ||
| + | clients: [ | ||
| + | { id: 1, nom: " | ||
| + | { id: 2, nom: " | ||
| + | { id: 3, nom: " | ||
| + | ], | ||
| + | nouvveauclient: | ||
| + | }; | ||
| + | | ||
| + | | ||
dev/reactform.1640700271.txt.gz · Dernière modification : 2021/12/28 14:04 de sbestel
