-
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
init commit #2740
base: master
Are you sure you want to change the base?
init commit #2740
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.
Great job! 🎉 Your code meets all the task requirements and constraints. The components are well-structured and handle state management effectively. Keep up the excellent work! If you want to further enhance your skills, consider exploring more advanced state management techniques in the future. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
value="" | ||
onChange={() => {}} | ||
value={titleInput} | ||
onChange={setTitleInput} |
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.
The onChange
prop should be a function that takes an event and updates the state. Make sure that setTitleInput
and other similar functions are correctly handling the event parameter. Typically, it should be something like onChange={(e) => setTitleInput(e.target.value)}
.
required | ||
/> | ||
|
||
<TextField name="description" label="Description" value="" /> | ||
<TextField | ||
onChange={setDescriptionInput} |
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.
Similar to the previous comment, ensure that setDescriptionInput
correctly handles the event parameter to update the state.
|
||
<TextField name="imgUrl" label="Image URL" value="" /> | ||
<TextField | ||
onChange={setImgUrlInput} |
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 setImgUrlInput
correctly handles the event parameter to update the state.
|
||
<TextField name="imdbUrl" label="Imdb URL" value="" /> | ||
<TextField | ||
onChange={setImdbUrlInput} |
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 setImdbUrlInput
correctly handles the event parameter to update the state.
|
||
<TextField name="imdbId" label="Imdb ID" value="" /> | ||
<TextField | ||
onChange={setimdbIdInput} |
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 setimdbIdInput
correctly handles the event parameter to update the state.
@@ -45,7 +45,7 @@ export const TextField: React.FC<Props> = ({ | |||
})} | |||
placeholder={placeholder} | |||
value={value} | |||
onChange={event => onChange(event.target.value)} | |||
onChange={event => onChange(event.target.value.trimStart())} |
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.
Use trim method, to trim from both sides
DEMO LINK