UNPKG

fbz

Version:

Fork of the OpenBazaar 2.0 browser-based client.

20 lines (15 loc) 406 B
import { createReducer } from 'redux-starter-kit'; import { NAV_MENU_OPEN, NAV_MENU_CLOSE } from 'actions/navMenu'; const initialState = { menuOpen: false }; const openMenu = (state, action) => { state.menuOpen = true; }; const closeMenu = (state, action) => { state.menuOpen = false; }; export default createReducer(initialState, { [NAV_MENU_OPEN]: openMenu, [NAV_MENU_CLOSE]: closeMenu });