{"size": 614, "ext": "js", "max_stars_repo_path": "src/main.js", "max_stars_repo_name": "samuraime/async-redux", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/main.js", "max_issues_repo_name": "samuraime/async-redux", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main.js", "max_forks_repo_name": "samuraime/async-redux", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.6060606061, "max_line_length": 53, "alphanum_fraction": 0.7068403909}
// require("@babel/register");
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';

import reducer from './reducer';
import mySaga from './mySaga';

// create the saga middleware
const sagaMiddleware = createSagaMiddleware();
// mount it on the Store
const store = createStore(
  reducer,
  applyMiddleware(sagaMiddleware),
);

// then run the saga
sagaMiddleware.run(mySaga);

// render the application
store.dispatch({
  type: 'GET_USER',
  payload: 'first',
});

store.dispatch({
  type: 'GET_USER',
  payload: 'second',
});

store.dispatch({
  type: 'BAR',
});
