You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to log the current window location every time there's a route change?
I know this is possible in react-router using an onUpdate handler. ReduxRouter doesn't come with such a handler. Could I set up some middleware somehow in my store?
The text was updated successfully, but these errors were encountered:
import{createHistory}from'history';consthistory=createHistory()// Listen for changes to the current location. The// listener is called once immediately.constunlisten=history.listen(location=>{ga('send',location);});// Configure reducer to store state at state.router// You can store it elsewhere by specifying a custom `routerStateSelector`// in the store enhancer belowconstreducer=combineReducers({router: routerStateReducer,//app: rootReducer, //you can combine all your other reducers under a single namespace like so});// Compose reduxReactRouter with other store enhancersconststore=compose(applyMiddleware(m1,m2,m3),reduxReactRouter({
routes,
history
}),devTools())(createStore)(reducer);React.render(<ReduxRoute/>,el)
Is it possible to log the current window location every time there's a route change?
I know this is possible in
react-router
using an onUpdate handler. ReduxRouter doesn't come with such a handler. Could I set up some middleware somehow in my store?The text was updated successfully, but these errors were encountered: