回答編集履歴

2

テキスト修正

2019/06/28 08:15

投稿

jun68ykt
jun68ykt

スコア9058

test CHANGED
@@ -22,13 +22,13 @@
22
22
 
23
23
 
24
24
 
25
- **修正:**
25
+ **修正案1:**
26
26
 
27
27
  ```javascript
28
28
 
29
29
  const res = yield call(
30
30
 
31
- apiService_a.get.bind(apiService_a),
31
+ apiService_a.get.bind(apiService_a), // 修正案1
32
32
 
33
33
  "hoge",
34
34
 
@@ -42,13 +42,13 @@
42
42
 
43
43
 
44
44
 
45
- **修正:**
45
+ **修正案2:**
46
46
 
47
47
  ```javascript
48
48
 
49
49
  const res = yield call(
50
50
 
51
- [apiService_a, apiService_a.get],
51
+ [apiService_a, apiService_a.get], // 修正案2
52
52
 
53
53
  "hoge",
54
54
 

1

テキスト修正

2019/06/28 08:15

投稿

jun68ykt
jun68ykt

スコア9058

test CHANGED
@@ -33,3 +33,27 @@
33
33
  "hoge",
34
34
 
35
35
  ```
36
+
37
+
38
+
39
+   
40
+
41
+ もしくは、[call([context, fn], ...args)](https://redux-saga.js.org/docs/api/#callcontext-fn-args) を使って、以下でうまくいくかもしれません。
42
+
43
+
44
+
45
+ **修正後:**
46
+
47
+ ```javascript
48
+
49
+ const res = yield call(
50
+
51
+ [apiService_a, apiService_a.get],
52
+
53
+ "hoge",
54
+
55
+ ```
56
+
57
+
58
+
59
+ 参考になれば幸いです。