-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
task solution was added #926
base: master
Are you sure you want to change the base?
task solution was added #926
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.
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.
src/components/NewCommentForm.tsx
Outdated
setBody(event.target.value); | ||
setIsBodyError(false); |
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.
it is bad practise to make anonymous arrow functions in jsx.
make handler in component and pass reference here
src/components/PostDetails.tsx
Outdated
Misha Hrynko | ||
</a> | ||
return ( | ||
<> |
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.
don't see any sense to use <>
here, because there is only one element inside
src/components/PostsList.tsx
Outdated
getComments(post.id) | ||
.then(setComments) | ||
.catch(() => { | ||
setIsCommentLoading(false); |
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.
you already have setIsCommentLoading
in finally block
src/components/PostsList.tsx
Outdated
handleOpenPostClick(post); | ||
setIsCommentLoadError(false); | ||
setIsCommentDeleteError(false); |
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.
it is bad practise to make anonymous arrow functions in jsx.
make handler in component and pass reference here
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.
You've got this, keep pushing forward!
DEMO LINK