Releases: zalmoxisus/redux-remotedev
Releases · zalmoxisus/redux-remotedev
v0.3.0
sendOnCondition
function (state, action) - when returns true
(the condition is satisfied), the report will be sent. Unlike sendOn
, here you can check not only the action type, but the whole action object and also the state object. Another difference is that by default the report will be sent only first time the condition is satisfied. If you want to send it multiple times, set options.sentOnCondition
to false
in beforeSending
function.
Example:
createStore(reducer, remotedev({
sendTo: 'http://localhost:8000',
sendOnCondition: (action, state) => state.counter.count === 5,
// sendOnCondition: (action, state) => state.user.id !== undefined,
// sendOnCondition: (action, state) => action.user.id !== undefined,
// sendOnCondition: (action, state) => action.type === 'SOME_ACTION'
}))