UNPKG
react-redux-feature-flags
Version:
latest (0.0.1)
0.0.1
Feature flagging React component with Redux store
react-redux-feature-flags
/
src
/
reducer.js
12 lines
(8 loc)
•
274 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
const
ADD_FEATURE_FLAGS
=
'@@feature-flags/ADD_FEATURE_FLAG'
const
initialState = {}
export
function
featureFlagsReducer
(
state = initialState, {
type
, features } = {}
) {
if
(
type
===
ADD_FEATURE_FLAGS
) {
return
{ ...state, ...features } }
return
state }