Skip to content

Update todoReducer.js#1

Open
nasamanaosoftware wants to merge 1 commit intoabhiscripts:mainfrom
nasamanaosoftware:patch-1
Open

Update todoReducer.js#1
nasamanaosoftware wants to merge 1 commit intoabhiscripts:mainfrom
nasamanaosoftware:patch-1

Conversation

@nasamanaosoftware
Copy link

Fixed bug, return incorrect structure in removing.

Fixed bug, return incorrect structure in removing.
Copy link
Owner

@abhiscripts abhiscripts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In todoReducer the todo value is already assigned in object format for REMOVE_TODO. Why you want to create a state as object of object line {todos: {todos : []}.

@nasamanaosoftware
Copy link
Author

Oh, sorry my bad, I just notice it.

That because I wrote code as you did on youtube, but I found that when I remove item, it return todos object instead of {todos: todos: []}. I think I might miss that object format on REMOVE_TODO part.

You may reject this PR. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants