UNPKG

ih-black-lion

Version:

State handler for Arus projects

14 lines (11 loc) 341 B
import { TOGGLE_PAGELET } from '../actionTypes'; const initialState = {}; const toggle = (state, action) => ({ ...state, [action.pagelet]: action.status }); export default function (state = initialState, action) { switch (action.type) { case TOGGLE_PAGELET: return toggle(state, action); default: return state; } }