Skip to content

Instantly share code, notes, and snippets.

@roniewill
Created August 29, 2018 15:45
Show Gist options
  • Save roniewill/0a931dfc8c808d94c3f3ad684843cf3a to your computer and use it in GitHub Desktop.
Save roniewill/0a931dfc8c808d94c3f3ad684843cf3a to your computer and use it in GitHub Desktop.
import * as types from '../actions/types';
const INITIAL_STATE = {
modalOpen: false,
};
export default (state = INITIAL_STATE, { type }) => {
switch (type) {
case types.MODAL_OPEN:
return { modalOpen: true };
case types.MODAL_CLOSE:
return INITIAL_STATE;
default: return state;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment