mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Added exercises
This commit is contained in:
@@ -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')
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user