teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

テキスト修正

2019/06/28 08:15

投稿

jun68ykt
jun68ykt

スコア9058

answer CHANGED
@@ -10,20 +10,20 @@
10
10
  "hoge",
11
11
  ```
12
12
 
13
- **修正:**
13
+ **修正案1:**
14
14
  ```javascript
15
15
  const res = yield call(
16
- apiService_a.get.bind(apiService_a),
16
+ apiService_a.get.bind(apiService_a), // 修正案1
17
17
  "hoge",
18
18
  ```
19
19
 
20
20
    
21
21
  もしくは、[call([context, fn], ...args)](https://redux-saga.js.org/docs/api/#callcontext-fn-args) を使って、以下でうまくいくかもしれません。
22
22
 
23
- **修正:**
23
+ **修正案2:**
24
24
  ```javascript
25
25
  const res = yield call(
26
- [apiService_a, apiService_a.get],
26
+ [apiService_a, apiService_a.get], // 修正案2
27
27
  "hoge",
28
28
  ```
29
29
 

1

テキスト修正

2019/06/28 08:15

投稿

jun68ykt
jun68ykt

スコア9058

answer CHANGED
@@ -15,4 +15,16 @@
15
15
  const res = yield call(
16
16
  apiService_a.get.bind(apiService_a),
17
17
  "hoge",
18
- ```
18
+ ```
19
+
20
+   
21
+ もしくは、[call([context, fn], ...args)](https://redux-saga.js.org/docs/api/#callcontext-fn-args) を使って、以下でうまくいくかもしれません。
22
+
23
+ **修正後:**
24
+ ```javascript
25
+ const res = yield call(
26
+ [apiService_a, apiService_a.get],
27
+ "hoge",
28
+ ```
29
+
30
+ 参考になれば幸いです。