Skip to content

Instantly share code, notes, and snippets.

@iosorin
Created October 26, 2020 06:41
Show Gist options
  • Select an option

  • Save iosorin/dc9318e44fb4313a8b000c963f66f71e to your computer and use it in GitHub Desktop.

Select an option

Save iosorin/dc9318e44fb4313a8b000c963f66f71e to your computer and use it in GitHub Desktop.
function* rootSaga() {
yield all([
takeLatest(login.type, loginUser),
takeLatest(logout.type, logoutUser),
takeLatest(loadNotes.type, fetchNotes),
takeLatest(loadCategories.type, fetchCategories),
takeLatest(loadSettings.type, fetchSettings),
takeLatest(sync.type, syncData),
takeLatest(
[
toggleDarkTheme.type,
togglePreviewMarkdown.type,
updateCodeMirrorOption.type,
toggleSettingsModal.type,
updateNotesSortStrategy.type,
],
syncSettings
),
])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment