meabhisingh/mernProjectEcommerce

redux format is old plz can you implement new format its not working

Opened this issue · 4 comments

redux format is old plz can you implement new format its not working

Yes i agree that his old format is not working well. What you can do is delete the module which is giving you errors, as he is using a lot of packages without which also you can work.
Some of his packeges are deprecated like redux-devtools-extension without which also you can work fine.

import {applyMiddleware,combineReducers, legacy_createStore as createStore} from "redux";
import {composeWithDevTools} from '@redux-devtools/extension';
import thunk from "redux-thunk";
import {productDetailsReducer, productsReducer} from "./reducers/productReducers.js";
import {userReducer} from "./reducers/userReducer.js";

const reducer = combineReducers({
  products: productsReducer,
  productDetail: productDetailsReducer,
  user: userReducer,
})

let initialState = {}
const middleware = [thunk];
const store = createStore( reducer, initialState, composeWithDevTools(applyMiddleware(thunk)))

export default store

try this

Hey! I aim to work on this issue. Let me know if it got solved. Thank you!

yes I've solve this problem