Skip to content
Snippets Groups Projects
index.js 1009 B
Newer Older
Orlando Piñero's avatar
Orlando Piñero committed
import React from 'react';
import ReactDOM from 'react-dom/client';

Orlando Piñero's avatar
Orlando Piñero committed
import { createStore, applyMiddleware } from 'redux'
Orlando Piñero's avatar
Orlando Piñero committed
import { Provider } from 'react-redux'

Orlando Piñero's avatar
Orlando Piñero committed
import thunk from 'redux-thunk';

Orlando Piñero's avatar
Orlando Piñero committed
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import rootReducer from './reducer/RootReducer';
Orlando Piñero's avatar
Orlando Piñero committed
import { BrowserRouter } from 'react-router-dom';
Orlando Piñero's avatar
Orlando Piñero committed

Orlando Piñero's avatar
Orlando Piñero committed
const initialState = {

}

const middlewares = [thunk]

const store = createStore(rootReducer, initialState, applyMiddleware(...middlewares))
Orlando Piñero's avatar
Orlando Piñero committed

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <Provider store={store}>
Orlando Piñero's avatar
Orlando Piñero committed
    <BrowserRouter>
      <App />
    </BrowserRouter>
Orlando Piñero's avatar
Orlando Piñero committed
  </Provider>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();