Open
Conversation
Leehaeun0
reviewed
Oct 11, 2021
| ...state, | ||
| // TODO: todo가 삭제 되었을 때 action.id 값을 이용하여 todos 가 삭제 되도록 수정하기 | ||
| // todos: | ||
| todos: api.getTodos(), |
Member
There was a problem hiding this comment.
이 코드에서 보다싶이 api.deleteTodo 함수는 삭제된 결과의 배열을 return 값으로 반환하고 있기 때문에,
굳이 api.getTodos() 호출할 필요 없이 아래처럼 바꾸면 됩니다!
Suggested change
| todos: api.getTodos(), | |
| case 'DELETE_TODO': | |
| return { | |
| ...state, | |
| todos: api.deleteTodo(action.id), | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Delete를 구현했습니다.
Help Wanted 👀
Related Issues
resolve #14
fix #
Checklist ✋
{PR type}: {PR title}로 맞췄습니다. (type 예시: feat | fix | BREAKING CHANGE | chore | ci | docs | style | refactor | perf | test) (참고: conventional commits)npm run build,npm run test)