本文整理匯總了TypeScript中redux-saga/lib/effects.js.takeEvery方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript js.takeEvery方法的具體用法?TypeScript js.takeEvery怎麽用?TypeScript js.takeEvery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類redux-saga/lib/effects.js
的用法示例。
在下文中一共展示了js.takeEvery方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: dao
// ------------------------------------
// The DAO Watcher Saga
// ------------------------------------
export default function* dao() {
yield takeEvery('ALL_MEMBERS_REQUESTED', fetchAllMembersWorker)
yield takeEvery('CHECK_MEMBERSHIP_REQUESTED', checkMembershipWorker)
yield takeEvery('CONTRACTS_INFO_REQUESTED', fetchContractsInfoWorker)
yield takeEvery('OWNER_ADDRESS_REQUESTED', fetchOwnerAddressWorker)
yield takeEvery('TX_ADD_MEMBER_REQUESTED', addMemberWorker)
yield takeEvery('TX_REVOKE_MEMBER_REQUESTED', revokeMemberWorker)
yield takeEvery('TX_TRANSFER_OWNERSHIP_REQUESTED', transferOwnershipWorker)
}
示例2: user
// ========================================================
// Watch user sagas
// ========================================================
export default function* user() {
yield takeEvery('USER_ACCOUNTS_REQUESTED', fetchUserAccountsWorker)
yield takeEvery('USER_DEFAULT_ACCOUNT_REQUESTED', setUserDefaultAccountWorker)
yield takeEvery('USER_BALANCE_REQUESTED', setUserBalanceWorker)
}
示例3: watchGetBlockNumber
export function* watchGetBlockNumber() {
yield takeEvery('ETHEREUM_INFO_REQUESTED', fetchEthereumInfoWorker)
}
示例4: vote
// ========================================================
// Watch vote saga
// ========================================================
export default function* vote() {
yield takeEvery('ALL_PROPOSALS_REQUESTED', fetchAllProposalsWorker)
yield takeEvery('ALL_VOTES_FOR_ALL_PROPOSALS_REQUESTED', fetchAllVotesForAllProposalsWorker)
yield takeEvery('TX_CREATE_PROPOSAL_REQUESTED', createProposalWorker)
yield takeEvery('TX_VOTE_SUBMISSION_REQUESTED', onVoteSubmitWorker)
}