This commit is contained in:
jpellizzari
2017-02-23 15:46:20 -08:00
parent 6619f59cf1
commit 68d5f75c8f
4 changed files with 40 additions and 8 deletions

View File

@@ -0,0 +1,23 @@
import _ from 'lodash';
import { clickNode } from '../actions/app-actions';
const INTERVAL = 3000;
function openNodeDetails(getState, dispatch) {
const action = clickNode();
if (typeof action === 'function') {
return action(dispatch, getState);
}
return dispatch(action);
}
const actions = [openNodeDetails];
export default function runDemo(getState) {
setInterval(() => {
const state = getState().toJS();
const fn = _.sample(actions);
}, INTERVAL);
}