const initialState = '' ; export const colorValueReducer = ( state = initialState , action ) => { switch ( action . type ) { case 'SEND_VALUE' : return action . payload ; case 'RESET' : return initialState ; default : return state ; } } ;