redux-devtools/packages/redux-devtools-app/src/reducers/section.ts

12 lines
301 B
TypeScript
Raw Normal View History

import { CHANGE_SECTION } from '../constants/actionTypes';
import { StoreAction } from '../actions';
export type SectionState = string;
export default function section(state = 'Actions', action: StoreAction) {
if (action.type === CHANGE_SECTION) {
return action.section;
}
return state;
}