質問編集履歴

2

修正

2020/08/29 04:46

投稿

tomsuma
tomsuma

スコア38

test CHANGED
@@ -1 +1 @@
1
- × TypeError: Cannot read property 'map' of undefined
1
+ × TypeError: tasks.map is not a function
test CHANGED
File without changes

1

修正

2020/08/29 04:46

投稿

tomsuma
tomsuma

スコア38

test CHANGED
File without changes
test CHANGED
@@ -180,7 +180,7 @@
180
180
 
181
181
  deleteTask: (state,action) => {
182
182
 
183
- state.tasks += state.task.filter((t) =>t.id !== action.payload.id);
183
+ state.tasks += state.tasks.filter((t) =>t.id !== action.payload.id);
184
184
 
185
185
  },
186
186
 
@@ -194,7 +194,7 @@
194
194
 
195
195
 
196
196
 
197
- export const selectTasks = (state) => state.task.value;
197
+ export const selectTasks = (state) => state.task.tasks;
198
198
 
199
199
 
200
200