Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as t from './constants';
- let initialState = { data:[] };
- const dataReducer = (state = initialState, action) => {
- switch (action.type) {
- case t.DATA_AVAILABLE:{
- let { data } = action;
- return {...state, data};
- }
- default:
- return state;
- }
- };
- export default dataReducer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement