Questions tagged [react-router-redux]

A library of bindings to keep react-router and redux in sync (formerly known as redux-simple-router).

A library of bindings to keep react-router and redux in sync (formerly known as redux-simple-router).


Related tags

502 questions
0
votes
1 answer

react-router-redux webpack dev server historyApiFallback fails

After enabling historyApiFallback in the webpack config file and restarting the server, when changing location pathname, the browser refreshes, causing outer elements to re-mount (what I mean is that, I can see it flash white and back to normal)…
punkbit
  • 6,464
  • 7
  • 45
  • 74
0
votes
3 answers

Server Side Rendering React

I've been trying to implement server side rendering for a Redux/React application for a while now. I've set everything up according to the examples that I followed but something weird is happening. When I look at the rendering process in the Google…
kjonsson
  • 2,589
  • 1
  • 11
  • 22
0
votes
1 answer

react-router-redux does not change content/view

I have the react-router-redux set up as this example. But dispatch(push(url)) does not change the content/view nor the url on address bar. Even though from my console I can see that the LOCATION_CHANGE and CALL_HISTORY_METHOD are successfully called…
spondbob
  • 1,093
  • 2
  • 12
  • 30
0
votes
1 answer

'push' does not work without showing any error

What I want is to change the route when user clicks a button. The code is very similar to real-world sample and all the steps introduced in react-router-redux are followed. reducer/index.js: import { combineReducers } from 'redux' import {…
J. Doe
  • 17
  • 5
0
votes
1 answer

Animation before routing to another page using react, redux and react-router-redux

I am working on an app that is built on the frontend using react, redux and react-router-redux for navigation and i don't have much frontend expirience. When i need to perform routing from one page to another, first i need to show animation, and…
0
votes
1 answer

How to dispatch action and modify object in react-redux? I have to create a navigation tab

I have to dynamically generate the navigation tab, navigation tab-list will be having many tabs (For Ex: home, about etc..). When I click any "tab" it should get active and its color should change. to achieve this I am using this object structure-…
Raj Rj
  • 2,944
  • 4
  • 18
  • 31
0
votes
1 answer

push() dispatches LOCATION_CHANGE action even if I push the same url

I'm using built-in react-router-redux push() action-creator to navigate routes in my application. It dispatches LOCATION_CHANGE action even when I push the same URL as the previous. Is it default behavior? And if it is, can I change it somehow…
wakwak
  • 106
  • 1
  • 7
0
votes
2 answers

react-router: get param from the router listen event fails

I'm finding that when trying to get the route parameter using react-router router.listen(...) it fails. By using window.location.pathname.split('route/')[1], I can get the parameter. Any tips ? I've been trying to figure out why this happens. So far…
punkbit
  • 6,464
  • 7
  • 45
  • 74
0
votes
1 answer

Is it a good idea to use browserhostory.push in action helpers?

In my React App I need to take decision based on data I receive from the server. If data is expected ( Dispatch actions to update state) If data has error tag ( browserhistory.push('/notfound'); ) If expected data is unable to parsed (…
0
votes
2 answers

Need individual entry with Redux and Router

I'm using ReactJS, Redux (with server-side rendering) and react-router-redux as set up here and am getting a little thrown by how routes work with the rest of the redux state and actions. For example, I have a members component with the route…
nicholas
  • 12,790
  • 19
  • 75
  • 126
0
votes
1 answer

Where to save "next pathname" if redirecting to Login in react-router?

I use react-router and react-router-redux, I will redirect user to Login page if he tries to visit a page requiring logged in without logging in: function…
Luke
  • 93
  • 1
  • 6
0
votes
1 answer

The best way to save and restore state between transitions

I am trying to implement pagination with backward and forward functionality, but the problem is how to keep state between transitions and restore on navigation? I was trying to achieve that with react-router in following way: Search Result…
jmac
  • 648
  • 3
  • 15
0
votes
2 answers

Map a route parameter to under a Redux store's key

There is a "location" key in the state object which is used by multiple components as data source. In the URL (very similar to google maps) I have a parameter called "location" which is a coordinate. My goal is to map that value (with some…
haxpanel
  • 3,270
  • 1
  • 30
  • 54
0
votes
0 answers

Dispatching an action makes react-router-redux change router props

I'm witnessing a behavior I fail to understand and that does not seems right. When I dispatch an action, my components re-render because this.props.location (and others, like params or routeParams) changes, and when I say "changes", I mean the…
François G.
  • 247
  • 2
  • 9
0
votes
1 answer

Actions as callbacks in react-router routes components

I would like to use a redux action as callback to the onChange event in the react-router route. I am also using the react-router-redux. Something like
feychu
  • 1,016
  • 11
  • 27