diff --git a/src/tutorial.test.ts b/src/tutorial.test.ts index e763eb4..74b4f09 100644 --- a/src/tutorial.test.ts +++ b/src/tutorial.test.ts @@ -54,7 +54,7 @@ test('mutation', () => { initial: { nextId: 0, todos: [] as Todo[] }, }); - dux.mutation(addTodo, (state, description) => { + dux.addMutation(addTodo, (description) => (state) => { state.todos.unshift({ description, id: state.nextId, done: false }); state.nextId++; });