Added exercises

This commit is contained in:
Ken
2019-03-02 23:22:09 -08:00
parent 46b89ff90b
commit 5b14d792f8
27 changed files with 271 additions and 478 deletions

View File

@@ -1,16 +1,19 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { reducer } from './reducers';
import { createStore } from 'redux';
import { TodoApp } from './components/TodoApp';
import { initializeIcons } from '@uifabric/icons';
import { composeWithDevTools } from 'redux-devtools-extension';
import { actions } from './actions';
import { StoreContext } from 'redux-react-hook';
const store = createStore(reducer, {}, composeWithDevTools());
console.log(store.getState());
initializeIcons();
// TODO: dispatch several actions and see the effects on state inside the Redux devtools
// store.dispatch(actions.???);
// store.dispatch(actions.???);
// store.dispatch(actions.???);
console.log(store.getState());
ReactDOM.render(
<StoreContext.Provider value={store}>
<TodoApp />
</StoreContext.Provider>,
document.getElementById('app')
);