本文整理汇总了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)
}