Skip to content

Commit

Permalink
Beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
AV1788 committed Jan 21, 2024
1 parent c9e7a5e commit 555a0b8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/NewMovie/NewMovie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ export const NewMovie = () => {
// Increase the count after successful form submission
// to reset touched status of all the `Field`s
const [count] = useState(0);
const [text, setText] = useState('');

const addText = (textInput: string) => {
setText(textInput);
};

return (
<form className="NewMovie" key={count}>
Expand All @@ -13,8 +18,8 @@ export const NewMovie = () => {
<TextField
name="title"
label="Title"
value=""
onChange={() => {}}
value={text}
onChange={addText}
required
/>

Expand Down

0 comments on commit 555a0b8

Please sign in to comment.