Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated index.js file with configureStore() #179

Open
wants to merge 12 commits into
base: PART_1_and_2
Choose a base branch
from
7 changes: 3 additions & 4 deletions client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';

// Install "npm install @reduxjs/toolkit" on server side
import { configureStore } from "@reduxjs/toolkit";
import { reducers } from './reducers';
import App from './App';
import './index.css';

const store = createStore(reducers, compose(applyMiddleware(thunk)));
const store = configureStore({ reducer: reducers });

ReactDOM.render(
<Provider store={store}>
Expand Down
Loading