Created
September 8, 2020 14:29
-
-
Save perjo927/d0fd6c050538feb9e4b8df83ff36107d to your computer and use it in GitHub Desktop.
Visibility reducer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CONSTS } from "../actions"; | |
const { | |
actions: { SET_VISIBILITY }, | |
visibilityFilters: { ALL }, | |
} = CONSTS; | |
export const setVisibility = (state, filter) => filter; | |
export const visibilityReducer = (state = ALL, action) => | |
action.type === SET_VISIBILITY ? setVisibility(state, action.value) : state; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment