dispatch(key, payload) : key should not object
Opened this issue · 0 comments
azu commented
material-flux/src/material-context.js
Lines 33 to 39 in fd08abf
dispatch(eventKey, ...args) {
this.dispatcher.dispatch({
eventKey,
args
});
this.emit('dispatch', {eventKey, args});
}
eventKey
should be string | Symbol like object's key.
if eventKey
is typeof object, assert this as error.
dispatch({
type : "HANDLE_SOME",
data : "data"
});
// throw error
It aim to prevent confusion of usage with other flux library like Redux, Facebook's flux etc...
I'v met similar issue on fluxible's Action.