Skip to content

Commit 1a0fe92

Browse files
committed
Creating a store
1 parent 9ba8070 commit 1a0fe92

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
3+
import { Provider } from 'react-redux';
4+
import { createStore } from 'redux';
5+
36
import './index.css';
47
import registerServiceWorker from './registerServiceWorker';
5-
import Hello from './components/StatefulHello';
8+
import Hello from './containers/Hello';
9+
import { enthusiasm } from './reducers';
10+
import { StoreState } from './types';
11+
import { EnthusiasmAction } from './actions';
12+
13+
const store = createStore<StoreState, EnthusiasmAction, any, any>(enthusiasm, {
14+
enthusiasmLevel: 1,
15+
languageName: 'TypeScript',
16+
});
617

718
ReactDOM.render(
8-
<Hello name="TypeScript" enthusiasmLevel={10} />,
19+
<Provider store={store}>
20+
<Hello />
21+
</Provider>,
922
document.getElementById('root') as HTMLElement
1023
);
1124
registerServiceWorker();

0 commit comments

Comments
 (0)