Utilisation de React pour le client
This commit is contained in:
14
client/src/store/sagas/root.js
Normal file
14
client/src/store/sagas/root.js
Normal file
@ -0,0 +1,14 @@
|
||||
import { all, takeEvery } from 'redux-saga/effects';
|
||||
import { handleFailedActionSaga } from './failure';
|
||||
|
||||
export function* rootSaga() {
|
||||
yield all([
|
||||
takeEvery(patternFromRegExp(/^.*_FAILURE/), handleFailedActionSaga),
|
||||
]);
|
||||
}
|
||||
|
||||
export function patternFromRegExp(re) {
|
||||
return (action) => {
|
||||
return re.test(action.type);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user