Skip to content

Commit

Permalink
Update undo example filter
Browse files Browse the repository at this point in the history
Fixes reduxjs#3422
Closes reduxjs#3423


Former-commit-id: afd96d8
Former-commit-id: 00f0b48
  • Loading branch information
timdorr committed May 8, 2019
1 parent b56135d commit c24b2bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/todos-with-undo/src/reducers/todos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import undoable, { includeAction } from 'redux-undo'
import undoable, { distinctState } from 'redux-undo'

const todo = (state, action) => {
switch (action.type) {
Expand Down Expand Up @@ -38,6 +38,6 @@ const todos = (state = [], action) => {
}
}

const undoableTodos = undoable(todos, { filter: includeAction(['ADD_TODO', 'TOGGLE_TODO']) })
const undoableTodos = undoable(todos, { filter: distinctState() })

export default undoableTodos

0 comments on commit c24b2bc

Please sign in to comment.