import { Reducer } from 'redux' ; import { MnistActions , MnistState } from './types' ; export const initialState = { predictionValues : [ ] } ; export const mnistReducer = ( state = initialState , action ) => { switch ( ( action as MnistActions ) . type ) { case '@@mnist/PREDICTIONS_LIST_UPDATED' : return { ... state , predictionValues : action . payload . predictions } ; default : return state ; } } ; export default mnistReducer ;