import { SearchActions , SearchActionTypes } from '../actions' ; export interface State { params : { [ key ] : any ; } ; } const initialState = { params : { } } ; export function reducer ( state = initialState , action ) { switch ( action . type ) { case SearchActionTypes . Search : { return { ... state , params : action . payload . params } ; } default : { return state ; } } } export const getParams = ( state ) => state . params ;