UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

61 lines (48 loc) 1.43 kB
# cosmo-redux-store Standard redux store for cosmo applications. This project has 2 purposes: 1) to reduce boilerplate and ensure all cosmo redux stores operate the same way 2) to ensure that all projects use the same versions and type definitions for react, redux and their various dependencies ### Usage ``` npm i -S @lml/cosmo-redux-store ``` Create a configuration object for the store, and then use it like so: ```typescript import { history, createCosmoReduxStore, CosmoReduxStoreConfig } from '@lml/cosmo-redux-store' import { Provider } from 'redux' import { ConnectedRouter } from 'react-router-redux' const config: CosmoReduxStoreConfig = { rootReducer, rootEpic epicDependencies, localStoragePaths: ['auth', 'jobs', 'etc'], localStorageKey: 'cosmo', disableReduxLogger: true } const store = createCosmoReduxStore(config) const App = () => ( <Provider store={store}> <ConnectedRouter history={history}> <MyApp /> </ConnectedRouter> </Provider> ) ``` ### Packages included - react - react-dom - react-redux - react-router - react-router-dom - react-router-redux - redux - redux-devtools-extension - redux-localstorage - redux-localstorage-debounce - redux-localstorage-filter - redux-logger - redux-observable - redux-thunk - reselect It is intended that this repo should be the single source of truth on which version of these packages we are running