-
Notifications
You must be signed in to change notification settings - Fork 1.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
solution #1549
base: master
Are you sure you want to change the base?
solution #1549
Conversation
src/App.tsx
Outdated
todosLength={todos.length} | ||
/> | ||
|
||
{(todos.length > 0 || tempTodo) && ( |
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 also can use this syntax
-
{todos.length > 0 && (
-
{!!todos.length && (
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.
I approve it, but fix small moments (based on mentor's recommendations from my experience)
src/App.tsx
Outdated
[todos], | ||
); | ||
|
||
const onAddTodo = async (todoTitle: string) => { |
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.
Better use name naming conventions for all cases like that (on>handle)
const onAddTodo = async (todoTitle: string) => {
const handleAddTodo = async (todoTitle: string) => {
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, but review my comments and fix them 🥹
DEMO LINK