Skip to content

Commit

Permalink
fix form slides
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroidoruido committed May 27, 2024
1 parent 6a2200c commit e8d4b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/markdown/07-formulaires/12-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type MyFormProps = {
function MyForm({ initialValue = '', onChange, onSubmit }: MyFormProps) {
const [value, setValue] = useState(initialValue);
const handleChange = (event: ChangeEvent<HtmlInputElement>) => { /* ... */ };
return <form onSubmit={() => onSubmit({ input: event.target.value })}>
<input defaultValue={initialValue} onChange={handleChange} />
return <form onSubmit={() => onSubmit({ input: value })}>
<input defaultValue={value} onChange={handleChange} />
<button type="submit">Send</button>
</form>;
}
Expand Down

0 comments on commit e8d4b1d

Please sign in to comment.