-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
develop #2748
base: master
Are you sure you want to change the base?
develop #2748
Conversation
nineuito
commented
Feb 8, 2025
- DEMO LINK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 🎉 Your code meets all the task requirements and constraints effectively. The form validation, submission, and reset functionalities are well-implemented, and the data handling is done correctly. Keep up the good work! If you want to further enhance your code, consider reviewing the implementation of the TextField
component to ensure it handles the onChange
prop correctly, and verify the data structure of moviesFromServer
to prevent any potential runtime errors. Keep coding and improving! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
export const App = () => { | ||
const [movies, setMovies] = useState(moviesFromServer); |
There was a problem hiding this comment.
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 data structure does not match, it could lead to runtime errors.
return ( | ||
<div className="page"> | ||
<div className="page-content"> | ||
<MoviesList movies={moviesFromServer} /> | ||
<MoviesList movies={movies} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that the MoviesList
component is correctly implemented to accept a movies
prop of type Movie[]
. This ensures that the list is rendered correctly.
</div> | ||
<div className="sidebar"> | ||
<NewMovie /* onAdd={(movie) => {}} */ /> | ||
<NewMovie onAdd={handleAddMovie} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the NewMovie
component is correctly implemented to accept an onAdd
prop, which should be a function that takes a Movie
object as an argument. This is crucial for the add movie functionality to work.
imdbId, | ||
}; | ||
|
||
onAdd(newMovie); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the onAdd
function passed as a prop is correctly implemented to handle the newMovie
object. This is essential for the movie to be added to the list in the parent component.
value="" | ||
onChange={() => {}} | ||
value={title} | ||
onChange={value => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that the TextField
component is implemented to accept an onChange
prop that provides the new value. This is necessary for the form fields to update the component state correctly.