This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { select, put, take } from 'redux-saga/effects'; | |
| function* emptySaga() {} | |
| export function* withConfirmation(text, onConfirm, onCancel = emptySaga) { | |
| yield put({ type: 'ShowConfirmationDialog', payload: text }); | |
| const { type } = yield take([ | |
| 'ConfirmationDialogConfirmed', | |
| 'ConfirmationDialogCanceled' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cheat Sheet | |
| Character classes | |
| . any character except newline | |
| \w \d \s word, digit, whitespace | |
| \W \D \S not word, digit, whitespace | |
| [abc] any of a, b, or c | |
| [^abc] not a, b, or c | |
| [a-g] character between a & g | |
| Anchors | |
| ^abc$ start / end of the string |
OlderNewer