All files / src/redux/PatientVisit patientvisit.js

0% Statements 0/7
100% Branches 0/0
100% Functions 0/0
0% Lines 0/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25                                                 
import { makeAsyncReducer, makeAsyncActionCreator, composeReducers } from 'redux-toolbelt';
import { makeAsyncSaga } from 'redux-toolbelt-saga';
import { fetchPatientVisitFromServer } from './service';
 
// Actions
export const actions = {
    fetchPatientVisit: makeAsyncActionCreator('FETCH_PATIENTVISIT')
};
 
// Reducer
export const reducer = composeReducers({
    patientVisit: makeAsyncReducer(actions.fetchPatientVisit)
});
 
// Sagas
const fetchPatientVisitSaga = makeAsyncSaga(
    actions.fetchPatientVisit,
    fetchPatientVisitFromServer,
    {
        debug: true
    }
);
 
export const sagas = [fetchPatientVisitSaga()];