How to use the redux-starter-kit.combineReducers function in redux-starter-kit

To help you get started, we’ve selected a few redux-starter-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Maxvien / next-shopify-storefront / src / reducers / index.js View on Github external
import { combineReducers } from 'redux-starter-kit';
import cart from './cart';
import product from './product';
import products from './products';

export const rootReducer = combineReducers({
  cart,
  product,
  products,
});
github Maxvien / next-shopify-storefront / store / index.ts View on Github external
import { combineReducers, configureStore, Store } from 'redux-starter-kit';
import checkout from './checkout.slice';
import product from './product.slice';
import products from './products.slice';

export const actions = {
  checkout: checkout.actions,
  product: product.actions,
  products: products.actions
};

const rootReducer = combineReducers({
  checkout: checkout.reducer,
  product: product.reducer,
  products: products.reducer
});

export function createStore(initialState = {}): Store {
  return configureStore({
    reducer: rootReducer,
    preloadedState: initialState
  });
}

redux-starter-kit

A simple set of tools to make using Redux easier

MIT
Latest version published 5 years ago

Package Health Score

78 / 100
Full package analysis