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
6
votes
2 answers

How to provide a history instance to a saga?

I would like to redirect to a new page after successful login. The routes (V4) are used like this: import { browserHistory } from '....browser_history_signleton'; ... class App extends Component { render() { const { authentication: {…
DraganS
  • 1,904
  • 19
  • 33
6
votes
0 answers

How to isomorphically handle subdomain with react + router + redux?

I'm building a service where other companies can host a community at companyname.mydomain.com. I have a Redux reducer called company that holds certain state about that company. I'd like to be able to isomorphically fetch data about that company…
6
votes
2 answers

How to access history.listen in a React component?

I have a specific component who would like to be notified every time the user navigates. Is there some way to access the history passed into the router? {// ...} Child component: var Component =…
Andrew Rasmussen
  • 13,619
  • 7
  • 40
  • 77
6
votes
1 answer

Access react router state in selector

I am moving a part of my app's state from the store to the URL. I am currently using redux to manage my app's state along with reselect to create selectors. The selectors compute derived values from the state in the redux store (in principal, this…
Tom Fenech
  • 65,210
  • 10
  • 85
  • 122
6
votes
2 answers

Get url params inside a Redux middleware using React-router

I'd like to extract the URL params inside a Redux middleware in order to dispatch an action and use those values in the payload.
haxpanel
  • 3,270
  • 1
  • 30
  • 54
5
votes
1 answer

How to reconcile TypeScript's `strictFunctionTypes` with React Router and Redux?

TypeScript 2.6 introduced strictFunctionTypes, and after upgrading, I can't seem to get Redux and React Router to play nice with it and each other. Thus, I'm wondering how best to define the types for a component that is both to be displayed on a…
Vincent
  • 3,523
  • 2
  • 34
  • 47
5
votes
1 answer

Cannot read property 'type' of undefined (react-router-redux)

I am trying to redirect to the page after signing out. However, every time when I sign out, it directs the page successfully. However, I still got the error Cannot read property 'type' of undefined Further research by "Pause on Caught Exceptions",…
Hongbo Miao
  • 31,551
  • 46
  • 124
  • 206
5
votes
2 answers

react-router-dom - navigate directly to route

When using react-router-dom, should I be able to create a route and navigate to it by manually entering its path in the URL? const App = () =>
Paul C
  • 153
  • 1
  • 3
  • 15
5
votes
2 answers

react-router and pretty URLs

What is the best way to use react-router with pretty URLs? All URLs are stored in DB (total amount about 400,000). When I follow link I need to resolve component for rendering from the server by AJAX request and render it. Thanks!
5
votes
1 answer

react native router-flux multiple sub scenes

I am trying to understand how to use router-flux and have multiple scenes/sub scenes similar to having multiple story boards, so that I can have a scene for the user sign up process, and then a scene for once the user is sign up and logged in. At…
Boss Nass
  • 3,186
  • 8
  • 35
  • 79
5
votes
1 answer

Get react router path in props with redux ownProps

I'm trying to get the current path of the react router in a container so I can pass it to a child component that will change it's visibility filter. More specifically, I'm trying to make a navigation menu highlight the currently active page. I'm…
sonarforte
  • 1,255
  • 12
  • 16
5
votes
1 answer

Redux state doesn't update with action dispatch

I've gone through every piece of documentation and example project I can find for building a react app with redux and react-router, but I just can't seem to figure out how to get my redux state to update when I dispatch actions. As you can see in…
DGaffneyDC
  • 142
  • 1
  • 2
  • 10
5
votes
0 answers

Retrieve parameters from react-router in Redux reducer

I am trying to change a URL parameter when an action is dispatched. It links to the next "case" in an experiment and is presented as an integer in the URL. How I imagine this: Initial URL /experiment/2 Dispatched Action { type: 'NEXT_CASE' } New URL…
neo post modern
  • 1,164
  • 10
  • 27
5
votes
1 answer

Get current location from react-router-redux

How do you get the current location when using "react-router-redux"? This is the routing state: { routing: { locationBeforeTransition: { pathname: "/foo", search: "", hash: "", state:…
Don P
  • 49,839
  • 95
  • 259
  • 394
5
votes
3 answers

Redux: Open external url after success response from an API

I want to open a url after receiving a success response from the api with the generated url. I'm trying to open that url inside the reducer like this: window.open(url, '_blank'); this seems to be working fine for most of the browsers, but is not…
parecementeria
  • 105
  • 1
  • 6