Created
June 3, 2017 14:38
-
-
Save ericstumper/65e892d815680657e9aa629d81edb15a to your computer and use it in GitHub Desktop.
Reducer
This file contains 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
[LOAD_METER_DATA_LATEST_FRAME]: (state, action) => { | |
const currentPropertyId = state.data.findIndex( | |
x => x.id === action.payload | |
); | |
return { | |
...state, | |
data: { | |
...state.data, | |
[currentPropertyId]: { | |
...state.data[currentPropertyId], | |
meterDataLatestFrame: { | |
data: null, | |
error: false, | |
loading: true, | |
}, | |
}, | |
}, | |
}; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment