-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
made add form for movie list #1908
base: master
Are you sure you want to change the base?
Conversation
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.
Good job! I didn't see mistakes. I think your code look awesome!
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.
Almost perfect!
src/components/NewMovie/NewMovie.tsx
Outdated
// #region state | ||
const [title, setTitle] = useState(''); | ||
const [description, setDescription] = useState(''); | ||
const [imgUrl, setImgUrl] = useState(''); | ||
const [imdbUrl, setImdbUrl] = useState(''); | ||
const [imdbId, setImdbId] = useState(''); | ||
// #endregion |
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.
Region comments are actually redundant here but it's up to you
src/components/NewMovie/NewMovie.tsx
Outdated
setTitle(''); | ||
setDescription(''); | ||
setImgUrl(''); | ||
setImdbUrl(''); | ||
setImdbId(''); |
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.
Would be great to create a separate function for resetting
src/components/NewMovie/NewMovie.tsx
Outdated
onChange={(value: string): void => { | ||
setTitle(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.
onChange={(value: string): void => { | |
setTitle(value); | |
}} | |
onChange={setTitle} |
Can be simplified a lot. Fix all cases
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.
Looks good to me, i'm approving it🔥
DEMO LINK