diff --git a/examples/todos/src/models/todos.ts b/examples/todos/src/models/todos.ts index 1f1924c9..df5f6a15 100644 --- a/examples/todos/src/models/todos.ts +++ b/examples/todos/src/models/todos.ts @@ -24,13 +24,16 @@ const model = { remove(state: TodosState, index: number) { state.splice(index, 1); }, + set(state: TodosState, nextState: TodosState) { + return nextState; + }, }, effects: () => ({ async refresh() { await delay(2000); // wait for data to load // pass the result to a local reducer - this.setState([ + this.set([ { text: 'react', },