How to use the redux-saga/effects.fork function in redux-saga

To help you get started, we’ve selected a few redux-saga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github web-pal / chronos-timetracker / app / renderer / sagas / index.js View on Github external
export default function* rootSaga(): Generator<*, void, *> {
  yield eff.all([
    // INITIALIZATION
    eff.fork(handleQuitRequest),
    eff.fork(takeInitialConfigureApp),
    eff.fork(initializeApp),
    eff.fork(handleAttachmentWindow),
    eff.fork(createDispatchActionListener),

    // auth
    eff.fork(authSagas.authFlow),
    eff.fork(authSagas.authSelfHostedFlow),
    eff.fork(authSagas.logoutFlow),
    eff.fork(authSagas.switchAccountFlow),

    // projects
    eff.fork(projectSagas.watchFetchProjectStatusesRequest),

    // issues
    eff.fork(issueSagas.watchFetchIssuesRequest),
    eff.fork(issueSagas.watchFetchRecentIssuesRequest),
github yuche / gouqi / src / sagas / playlist.ts View on Github external
export default function* watchPlaylist () {
  yield all([
    fork(syncPlaylistDetail),
    fork(subscribePlaylist),
    fork(popupTrackActionSheet),
    fork(popupCollectActionSheet),
    fork(collectTrackToPlayliast),
    fork(toCommentPage),
    fork(toCreatePlaylistPage),
    takeLatest('playlists/refresh', refreshPlaylist),
    takeLatest('playlists/sync', syncPlaylists)
  ])
}
github WaftTech / WaftEngine / client / app / containers / Profile / saga.js View on Github external
function* verifyEmail(action) {
  const successWatcher = yield fork(redirectOnVerifySuccess);
  const token = yield select(makeSelectToken());
  const user = yield select(makeSelectUser());
  yield fork(
    Api.post(
      `user/verifymail`,
      actions.verifyEmailSuccess,
      actions.verifyEmailFailure,
      { email: user.email, code: action.payload },
      token,
    ),
  );
  yield take([LOCATION_CHANGE, types.VERIFY_EMAIL_FAILURE]);
  yield cancel(successWatcher);
}
github edp963 / wormhole / rider / rider-webapp / app / containers / Manager / sagas.js View on Github external
export function* getAdminAllFlowsWatcher () {
  yield fork(takeLatest, LOAD_ADMIN_ALL_STREAMS, getAdminAllStreams)
}
github ZeusWPI / MOZAIC / planetwars / client / app / sagas / runMatch.ts View on Github external
function* runLobby(runner: MatchRunner) {
  yield fork(watchConnectEvents, runner.matchControl);
  yield fork(watchDisconnectEvents, runner.matchControl);
  yield fork(watchCreatePlayer, runner.matchControl);
  yield fork(watchRunLocalBot, runner);
}
github nodgroup / maka-native / src / store / sagas.ts View on Github external
export default function* sagas() {
  yield fork(watchUserLogin);
  yield fork(watchUserRegister);
  yield fork(watchUserAuth);
  yield fork(watchUserLogout);
  yield fork(watchUser);
}