2016-11-07 13 views
0

私はサガを(下記​​の例を参照して)呼び出そうとしていますが、使用putを送信するとこれは行われません。例:内からサガを呼び出す

function * example() { 
    while (true) { 
    yield take('initialAction') 
    const someAction = yield call(apiClient.someClientAction, parameter) 
    yield put({ type: initialAction' }) 
    } 
} 

これは正しいパターンか、ドキュメントに何か不足しているのでしょうか。

ありがとうございます!

答えて

0

ソリューションに興味がある人については、以下を参照:詳細については

function * example() { 
    const chan = yield actionChannel('initialAction') 
    while (true) { 
    yield take(chan) 
    const someAction = yield call(apiClient.someClientAction, parameter) 
    yield put({ type: initialAction' }) 
    } 
} 

check the documentationgithub answer

関連する問題