123456789101112131415161718192021222324252627 |
- import * as actions from "../constants/index";
- const initialState = {
- gotNews: [],
- // getNews: [],
- searchNews: []
- };
- export default (
- state = initialState,
- {
- gotNews,
- type
- }
- ) => {
- switch (type) {
- case actions.GET_NEWS:
- return{
- ...state,
- gotNews
- };
- default: {
- return { ...state};
- }
- }
- };
|