2.3.0 • Published 4 years ago

@alexseitsinger/redux-locations v2.3.0

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
4 years ago

Redux Locations

Save location changes to the 'locations' store state.

Installation

yarn add @alexseitsinger/redux-locations

Example

// store.js
import { createLocationsMiddleware } from "@alexseitsinger/redux-locations"

const locationsMiddleware = createLocationsMiddleware()

export const configureStore = (history, initialState) => {
  const middleware = [locationsMiddleware]
  //...
}

// reducer.js
import { locationsReducer } from "@alexseitsinger/redux-locations"

export const rootReducer = combineReducers({
  ...
  locations: locationsReducer,
  ...
})