frontend/src/reducer.js
//reducers for updating props of components
reducers for updating props of components
reducers for updating props of components
function reducer(state={data:[]},action){
  if(action.type === "getList"){
    state = {...state,data:action.payload}
  }else if(action.type === "search"){
  	state = {...state,data:action.payload}
  }
  return state;
}
function reducer ( state = { data : [ ] } , action ) { if ( action . type === "getList" ) { state = { ... state , data : action . payload } } else if ( action . type === "search" ) { state = { ... state , data : action . payload } } return state ; }
reducers for updating props of components
reducers for updating props of components