diff --git a/lib/actions/index.js b/lib/actions/index.js index 44dfe898..e3b4dac7 100644 --- a/lib/actions/index.js +++ b/lib/actions/index.js @@ -1,9 +1,13 @@ -import {INIT} from '../constants'; import rpc from '../rpc'; +import { INIT } from '../constants'; -export function init() { - rpc.emit('init'); - return { - type: INIT +export function init () { + return (dispatch) => { + dispatch({ + type: INIT, + effect: () => { + rpc.emit('init'); + } + }); }; }