Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add task solution #2687

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add task solution #2687

wants to merge 1 commit into from

Conversation

shymdima
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on implementing the NewMovie.tsx component and ensuring it meets the task requirements! 🎉 The form submission and state management are well-handled, and the code adheres to the checklist guidelines. Just make sure to double-check the onChange handlers for the TextField components to ensure they correctly update the state, and verify that moviesFromServer is structured as expected. Keep up the excellent work! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨


export const App = () => {
const [movies, setMovies] = useState<Movie[]>([...moviesFromServer]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that moviesFromServer is an array of Movie objects. If the structure of moviesFromServer does not match the Movie type, it could lead to runtime errors. Verify the structure of moviesFromServer in movies.json.

value=""
onChange={() => {}}
value={title}
onChange={newValue => setTitle(newValue)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the TextField component's onChange prop correctly passes the new value to the setTitle function. Verify that newValue is the expected type and format.

name="description"
label="Description"
value={description}
onChange={newValue => setDescription(newValue)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the TextField component's onChange prop correctly passes the new value to the setDescription function. Verify that newValue is the expected type and format.

name="imgUrl"
label="Image URL"
value={imgUrl}
onChange={newValue => setImgUrl(newValue)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the TextField component's onChange prop correctly passes the new value to the setImgUrl function. Verify that newValue is the expected type and format.

name="imdbUrl"
label="Imdb URL"
value={imdbUrl}
onChange={newValue => setImdbUrl(newValue)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the TextField component's onChange prop correctly passes the new value to the setImdbUrl function. Verify that newValue is the expected type and format.

name="imdbId"
label="Imdb ID"
value={imdbId}
onChange={newValue => setImdbId(newValue)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the TextField component's onChange prop correctly passes the new value to the setImdbId function. Verify that newValue is the expected type and format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants