當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript js.takeEvery方法代碼示例

本文整理匯總了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)
}
開發者ID:asseth,項目名稱:dao1901,代碼行數:12,代碼來源:daoSaga.ts

示例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)
}
開發者ID:asseth,項目名稱:dao1901,代碼行數:8,代碼來源:userSaga.ts

示例3: watchGetBlockNumber

export function* watchGetBlockNumber() {
  yield takeEvery('ETHEREUM_INFO_REQUESTED', fetchEthereumInfoWorker)
}
開發者ID:asseth,項目名稱:dao1901,代碼行數:3,代碼來源:ethereumSaga.ts

示例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)
}
開發者ID:asseth,項目名稱:dao1901,代碼行數:9,代碼來源:votesSaga.ts


注:本文中的redux-saga/lib/effects.js.takeEvery方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。