Files
frontend-bootcamp/step2-05/demo/src/index.tsx
2019-03-02 21:44:19 -08:00

16 lines
423 B
TypeScript

import { reducer } from './reducers';
import { createStore } from 'redux';
import { actions } from './actions';
import { composeWithDevTools } from 'redux-devtools-extension';
const store = createStore(reducer, {}, composeWithDevTools());
store.dispatch(actions.addTodo('hello'));
let action = actions.addTodo('world');
store.dispatch(action);
store.dispatch(actions.remove(action.id));
console.log(store.getState());