Skip to content

Instantly share code, notes, and snippets.

@erezrokah
Last active June 5, 2017 09:25
Show Gist options
  • Save erezrokah/c822b2746a4bd8c6b0604ae092d330e9 to your computer and use it in GitHub Desktop.
Save erezrokah/c822b2746a4bd8c6b0604ae092d330e9 to your computer and use it in GitHub Desktop.
['FIREBASE_LISTEN_REQUESTED'](state, action) {
const newState = {
...state,
[action.metaType]: {
...state[action.metaType],
inProgress: true, error: '', ref: action.ref
}
}
return newState
},
...
['FIREBASE_LISTEN_REMOVED'](state, action) {
const newState = {
...state,
[action.metaType]: {
...state[action.metaType],
inProgress: false, error: '', ref: null
}
}
return newState
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment