How to use the react-router-redux.routerMiddleware function in react-router-redux

To help you get started, we’ve selected a few react-router-redux 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 samuelmaddock / metastream / packages / metastream-app / src / store / configureStore.prod.ts View on Github external
function configureStore(opts: ConfigureStoreOptions) {
  const thunkMiddleware = thunk.withExtraArgument(opts.extra)

  // Persist Middleware
  const persistedReducer = persistReducer(persistConfig, rootReducer)

  const router = routerMiddleware(history)
  const enhancer = applyMiddleware(thunkMiddleware, ...appMiddleware, router)

  const store = createStore(persistedReducer, opts.initialState || {}, enhancer)
  const persistor = persistStore(store, undefined, opts.persistCallback)

  return { store, persistor }
}
github owtf / owtf / owtf / webapp / src / store / configureStore.prod.js View on Github external
export default function configureStore(initialState, history) {
    // Add so dispatched route actions to the history
    const reduxRouterMiddleware = routerMiddleware(history);

    const middleware = applyMiddleware(thunk, reduxRouterMiddleware);

    return createStore(rootReducer, initialState, middleware);
}
github alixander / Ceruleum / app / store / configureStore.prod.js View on Github external
function configureStore(initialState) {
  const router = routerMiddleware(history);

  const sagaMiddleware = createSagaMiddleware();
  const enhancer = applyMiddleware(router, sagaMiddleware);

  const store = createStore(rootReducer, initialState, enhancer);
  sagaMiddleware.run(sagas);
  return store;
}
github honeytrap / honeytrap / vendor / github.com / honeytrap / honeytrap-web / src / index.js View on Github external
function configureStore() {
    return createStore(
        reducers,
        {},
        applyMiddleware(
            routerMiddleware(history),
            promise,
        ),
    );
}
github lifechurch / melos / nodejs / app / store / configureStore.js View on Github external
export default function configureStore(initialState, history, logger) {
	const reduxRouterMiddleware = routerMiddleware(history)
	let finalCreateStore = null
	if (logger !== null) {
		finalCreateStore = compose(
			applyMiddleware(thunk, youversionApi, googleMapsApi, youversionAuth, reduxRouterMiddleware, logger)
		)(createStore)
	} else {
		finalCreateStore = compose(
			applyMiddleware(thunk, youversionApi, googleMapsApi, youversionAuth, reduxRouterMiddleware)
		)(createStore)
	}

	return finalCreateStore(rootReducer, initialState)
}

react-router-redux

Ruthlessly simple bindings to keep react-router and redux in sync

MIT
Latest version published 8 years ago

Package Health Score

58 / 100
Full package analysis