hyper/lib/actions/index.js
Nathan Rajlich f939d88354 return a Redux thunk for the INIT action (#675)
Before, Redux was throwing an error saying that a plain
object was not being returned from the `init()` function
which was breaking hyperterm.
2016-10-04 14:41:50 -07:00

13 lines
219 B
JavaScript

import rpc from '../rpc';
import { INIT } from '../constants';
export function init () {
return (dispatch) => {
dispatch({
type: INIT,
effect: () => {
rpc.emit('init');
}
});
};
}