import { Action } from '@ngrx/store' ; import { HomeActions } from "./home.actions" ; export interface HomeState { tracksRendered : boolean ; } ; const defaultState = { tracksRendered : false , } ; export function HomeReducer ( state = defaultState , action ) { switch ( action . type ) { case HomeActions . RENDERED : const changedSetting = { tracksRendered : action . payload } ; return Object . assign ( { } , state , changedSetting ) ; default : return state ; } }