Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return update(state, {
- [newestState.findIndex(list=>list.id===action.list)]: {
- entries: entries => update(
- entries, {
- $splice: [[entries.findIndex(item=>item.id===action.item),0]]
- }
- )
- }
- });
- return update(state, {
- [newestState.findIndex(list=>list.id===action.list)]: {
- entries: entries => entries.filter(elem => elem.id != action.item )
- }
- });
Add Comment
Please, Sign In to add comment