diff --git a/src/App.tsx b/src/App.tsx index 00e06fb50..6bf200ea4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,17 +8,17 @@ import { Movie } from './types/Movie'; export const App = () => { const [moviesList, setMoviesList] = useState(moviesFromServer); + const addMovie = (movie: Movie) => { + setMoviesList([...moviesList, movie]); + }; + return (