20 lines
537 B
JavaScript
20 lines
537 B
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import Test from './components/Test';
|
|
import { Provider } from 'react-redux';
|
|
import { createStore } from 'redux';
|
|
import rootReducer from './store/reducers';
|
|
|
|
const store = createStore(
|
|
rootReducer,
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
|
|
);
|
|
|
|
const rootElement = document.querySelector(document.currentScript.getAttribute('data-container'));
|
|
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<Test />
|
|
</Provider>,
|
|
rootElement,
|
|
);
|