Skip to content

Commit

Permalink
Update undo example filter
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed May 8, 2019
1 parent 8053938 commit afd96d8
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 afd96d8

Please sign in to comment.