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
| const state = {}; | |
| const getState = () => state; | |
| const setState = newState => Object.assign(state, newState); | |
| export { getState, setState }; |
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 * as actions from '../../constants/actions'; | |
| import * as service from '../../services/users'; | |
| export function* usersSaga({ payload }) { | |
| try { | |
| const users = yield call(service.find, payload); | |
| yield put({ | |
| type: actions.USER_SEARCH_SUCCESS, | |
| payload: users |