-
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
Develop #1564
base: master
Are you sure you want to change the base?
Develop #1564
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 👍
Let's improve your code
If you need help with tests, pls feel free in the fe_chat
src/App.tsx
Outdated
.then(todosFromServer => { | ||
setTodos(todosFromServer); | ||
}) |
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.
.then(todosFromServer => { | |
setTodos(todosFromServer); | |
}) | |
.then(setTodos) |
src/App.tsx
Outdated
// const isSuccess = results | ||
// .filter(result => result.status === 'fulfilled') | ||
// .map((_, index) => completedTodos[index].id); |
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.
Remove all comments
// const isSuccess = results | |
// .filter(result => result.status === 'fulfilled') | |
// .map((_, index) => completedTodos[index].id); |
src/App.tsx
Outdated
|
||
const USER_ID = 0; | ||
function filterTodos(todos: Todo[], filterBy: string) { | ||
const copy = [...todos]; |
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 need to create a copy for todos
, method filter returns new array
I actually did, but did not get a helpful answer |
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! 👍
DEMO LINK
Same as with last task, I didn`t pass 2 tests, but I did others