Permalink
Browse files

Fix example: todos-with-undo (#2788)

* Add action filter to reducer undoableTodos
  • Loading branch information...
shuaibird authored and timdorr committed Jan 9, 2018
1 parent 89571cd commit ba7786cba3566d7e6a5d6a54f574c56069e3ddb7
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/todos-with-undo/src/reducers/todos.js
@@ -1,4 +1,4 @@
import undoable from 'redux-undo'
import undoable, { includeAction } from 'redux-undo'
const todo = (state, action) => {
switch (action.type) {
@@ -38,6 +38,6 @@ const todos = (state = [], action) => {
}
}
const undoableTodos = undoable(todos)
const undoableTodos = undoable(todos, { filter: includeAction(['ADD_TODO', 'TOGGLE_TODO']) })
export default undoableTodos

0 comments on commit ba7786c

Please sign in to comment.