vn-verdnaturachat/app/sagas/activeUsers.js

14 lines
381 B
JavaScript
Raw Normal View History

2018-02-16 22:57:46 +00:00
import { put, takeLatest } from 'redux-saga/effects';
import * as types from '../actions/actionsTypes';
import { setActiveUser } from '../actions/activeUsers';
2018-02-16 22:57:46 +00:00
const watchActiveUsers = function* handleInput({ users }) {
yield put(setActiveUser(users));
};
const root = function* root() {
2018-02-16 22:57:46 +00:00
yield takeLatest(types.ACTIVE_USERS.REQUEST, watchActiveUsers);
};
export default root;