score:0

 export const makestore = (context: context) => {
     const sagamiddleware = createsagamiddleware();
      const store = createstore(
        rootreducer,
        // list of your middlewares here
        bindmiddleware([thunk, sagamiddleware])
      );
      // in case someone else uses saga
      (store as sagastore).sagatask = sagamiddleware.run(rootsaga);

  return store;
};

your rootreducer:

const rootreducer = combinereducers({
  productlist: productlistreducer,
  cart: cartreducer,
  user: userloginreducer,
  userdetail: userdetailreducer,
});

and your rootstate

export type rootstate = returntype<typeof rootreducer>;

score:1

my understanding of redux is that the store is the data object. so it's entirely defined by you.

interface storetype {
  label: string;
}

suppose the above is your data structure


Related Query

More Query from same tag