質問編集履歴
1
追加の情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -244,6 +244,90 @@
|
|
244
244
|
|
245
245
|
|
246
246
|
|
247
|
+
**stub**
|
248
|
+
|
249
|
+
```typescript
|
250
|
+
|
251
|
+
export const data = [
|
252
|
+
|
253
|
+
{
|
254
|
+
|
255
|
+
taskId: 1,
|
256
|
+
|
257
|
+
title: "title",
|
258
|
+
|
259
|
+
description: "description",
|
260
|
+
|
261
|
+
status: "ok",
|
262
|
+
|
263
|
+
createTime: "2020-12-16",
|
264
|
+
|
265
|
+
updateTime: "2020-12-16",
|
266
|
+
|
267
|
+
tag: ["#react", "#redux"],
|
268
|
+
|
269
|
+
},
|
270
|
+
|
271
|
+
{
|
272
|
+
|
273
|
+
taskId: 2,
|
274
|
+
|
275
|
+
title: "title",
|
276
|
+
|
277
|
+
description: "description",
|
278
|
+
|
279
|
+
status: "ok",
|
280
|
+
|
281
|
+
createTime: "2020-12-16",
|
282
|
+
|
283
|
+
updateTime: "2020-12-16",
|
284
|
+
|
285
|
+
tag: ["#react", "typescript"],
|
286
|
+
|
287
|
+
},
|
288
|
+
|
289
|
+
];
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
```
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
**action**
|
298
|
+
|
299
|
+
```typescript
|
300
|
+
|
301
|
+
import axios from "axios";
|
302
|
+
|
303
|
+
import { data } from "./test-stub";
|
304
|
+
|
305
|
+
import { listData } from "../reducer/events";
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
export const READ_EVENTS = "READ_EVENTS";
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
// const ROOT_URL = "http://localhost:3000"
|
314
|
+
|
315
|
+
const ROOT_URL = "https://udemy-utils.herokuapp.com/api/v1";
|
316
|
+
|
317
|
+
const QUERYSTRING = "?token=token123";
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
export async function readEvents(dispatch: any) {
|
322
|
+
|
323
|
+
dispatch({ type: "READ_EVENTS", data });
|
324
|
+
|
325
|
+
}
|
326
|
+
|
327
|
+
```
|
328
|
+
|
329
|
+
|
330
|
+
|
247
331
|
**GitHub**
|
248
332
|
|
249
333
|
[Github](http://github.com/ykobaya14/dcproject0001/tree/feature/clinet-test)
|