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
8
votes
1 answer

React + Redux + Router - should I use one state/store for all pages/components?

I am using React + Redux, and after reading about react-router-redux and redux-router, and after reading Dan Abramov's answer, I decided to use "vanilla" react-router (I don't care about time travel etc. at this point). The only open question left…
Yaniv Efraim
  • 6,200
  • 6
  • 48
  • 92
8
votes
1 answer

With React Redux Router, how should I access the state of the route?

With react-router-redux, it appears as though the only way to get routing information is through props only. Is this right? Here's roughly what I am doing in my app right now:
Jason D
  • 757
  • 1
  • 10
  • 19
7
votes
2 answers

Accessing params with react-router-redux

I'm using react-router-redux (https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux) installed with npm install --save react-router-redux@next implemented like so:
zoopz
  • 739
  • 2
  • 7
  • 9
7
votes
1 answer

this.props.children undefined when using react-router-redux

I have followed the react-router-redux example on the github page, but when I try to pass {this.props.children} to the IndexRoute and I try to log it, it's undefined. The only error I get through the console is Warning: You should not use
qasimalbaqali
  • 1,825
  • 18
  • 45
7
votes
3 answers

Configuring app's basename in react-router

I'm struggling a bit with react-router 2.x configuration, specifically app basename. I've an application which may have different base root throughout its lifecycle. For instance: / in development /users in production /account in production after…
Ilya Ayzenshtok
  • 621
  • 2
  • 7
  • 15
7
votes
5 answers

How to pass actions down to the components in redux

I want to fire an action down in my component. This is a presentation component and need not be redux aware. Router implementation is done using react-router-redux. main.js: let store = createStore(rootReducer) const history =…
User1230321
  • 1,165
  • 4
  • 17
  • 36
7
votes
2 answers

Reducer not catching LOCATION_CHANGE action

I'm working toward having my React/Redux app update the URL based on actions. I've done quite a bit of looking around. I thought I had a handle on it, but obviously I'm missing something. I have other reducers that respond correctly. Currently, I'm…
Will Luce
  • 1,497
  • 1
  • 16
  • 30
7
votes
5 answers

How to use react-router-redux routeActions?

I'm trying to modify the example code of react-router-redux. https://github.com/rackt/react-router-redux/blob/master/examples/basic/components/Home.js this is my Home.js class Home extends Component { onSubmit(props) { …
JAckWang
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

onEnter Transitions with React Router and Redux Simple Router Dont Render New Route's Component

I have an app using react @0.14, redux @3.05, react-router @1.0.3, and redux-simple-router @2.0.2. I'm trying to configure onEnter transitions for some of my routes based on store state. The transition hooks successfully fire and push new state to…
Jon
  • 4,727
  • 4
  • 17
  • 29
7
votes
1 answer

How to combine react-router useRouterHistory with redux-simple-router

I'm trying to use react-router 2.0 with redux-simple-router but I can't get it to work with query parsing. This is what I got from the docs: const appHistory = useRouterHistory({ parseQueryString: parse, stringifyQueryString:…
Thijs Koerselman
  • 16,219
  • 15
  • 62
  • 89
6
votes
4 answers

React Router or Link Not Rendered

I am using react-router-dom in a redux app. This is my initial setup in index.js: ReactDOM.render( , document.getElementById('root')); Then in my…
preston
  • 2,211
  • 5
  • 20
  • 46
6
votes
2 answers

Check the render method

I am using react, redux and react-redux-router. When I run an application I get an error. I do not understand what it has to do with the render function of react in my App.js. It seems to me that problem is lying somewhere else in the code. The…
user3661407
  • 405
  • 3
  • 8
  • 16
6
votes
1 answer

Routes are not navigating when React v15.5 setup with react-redux v5 is

I am new with React and I have setup my React project with Facebook's create-react-app. Here are the core files: Index.js import React from 'react'; import ReactDOM, { render } from 'react-dom'; import { BrowserRouter as Router } from…
6
votes
2 answers

What is the difference between "push" method from react-router-redux and "browserHistory" from react-router?

I am trying to update history in react when the user navigates from one page/route to another. But confused about what method I should use to achieve this and why? import { browserHistory } from 'react-router' browserHistory.push('/bag') OR import…
Jyoti Duhan
  • 605
  • 10
  • 22
6
votes
3 answers

Cannot determine how to use Redux and React-router on the same component

I am starting to learn typescript and the is a behaviour that I don't understand. I got this error: Type 'ComponentClass<{}>' is not assignable to type 'StatelessComponent> | ComponentClass
Kornflexx
  • 1,461
  • 13
  • 19
1 2
3
33 34