Questions tagged [redux-router]
27 questions
4
votes
1 answer
Is it an efficient practice to add new epics lazily inside react-router onEnter hooks?
When using redux-observable with react-router, would it make sense to asynchronously add new epics as per the instructions in the documentation here inside onEnter hooks of react-router during route changes?
./epics/index.js
import { BehaviorSubject…

claireablani
- 7,804
- 5
- 16
- 19
3
votes
0 answers
Confirmation message after redirect in React/Redux
I am using React, Redux, Redux Router, and Redux Form for a web application, and I would like to implement an "edit" form. The form lives under the URL /components/1/edit.
When the form is successfully submitted I would like to redirect to…

Anvar
- 1,110
- 2
- 10
- 22
2
votes
1 answer
React toolkit and redux-first-router
I am digging into React with Redux for a rewrite of our product.
A lot of fog around Redux was cleared by using Redux-Toolkit https://redux-toolkit.js.org/.
Then I found that React-Router made state management messy and found a solution in …

ztaff
- 243
- 1
- 8
2
votes
0 answers
React router component activeStyle/activeClassName not working with browser history
I have a router set up like this:

erol_smsr
- 1,454
- 4
- 24
- 49
2
votes
2 answers
How to add push method from redux-router to actions
I'm trying to add push method from redux-router in actions.
When I init action, push receiving an object in payload, but don`t change the page.
enter image description here
actions/index.js
import { push } from 'redux-router';
export const…

mikilka
- 23
- 3
2
votes
1 answer
Redux Router Uncaught TypeError: createHistory is not a function
Redux Router Version ^2.1.2
react-router version: "react-router": "^3.0.0",
history version: "history": "^4.3.0",
Steps to reproduce
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import {…

ssuhat
- 7,387
- 18
- 61
- 116
1
vote
2 answers
How to redirect to external url using .push redux-router?
I have Card which is redirecting on external URL on click. But instead of using location.href, I need to use redux-router's .push command. How can I do this?
Simple example of the code:
{
…

Kate
- 288
- 2
- 4
- 17
1
vote
1 answer
React router open modal
I'm new to react and redux world. I have a question regarding react router. Following is my App component.
class App extends React.PureComponent {
render() {
return (

Dayan
- 711
- 5
- 16
- 27
1
vote
2 answers
Uncaught TypeError: Cannot call a class as a function in react and redux
I am using reactjs and redux for data control,and the code for component is
Employeeprofile.jsx:
import React from 'react';
import UserPersonalProfile from './UserPersonalProfile.jsx';
import ViewUserPersonal from './ViewUserPersonal.jsx';
import…

priya
- 158
- 5
- 16
1
vote
2 answers
Render method returns null in react router v4
I'm trying to implement a private route with react-router v4 and redux, but the render prop returns null for some reason. I'd be very grateful if someone helps me figure out what is wrong.
Router:
const router = (
…

Umbrella
- 1,085
- 1
- 14
- 30
1
vote
2 answers
Wrapping application routes for children with React-Router-4
When using react-router (version 3), I was able to create nested routes, as the wrapper component received the children.
I was able, this way, the use a "global" reducer for the root component, as every child component had it's own…

Chen
- 2,958
- 5
- 26
- 45
1
vote
2 answers
GAE web.xml to fallback to React-Router
I'm trying to build a new frontend on top of an existing GAE application using React, Redux and Redux-Router. My problem is figuring out how to make GAE always fallback to the html page where Redux-Router will take care of the routing.
Right now, if…

sleeveroller
- 39
- 5
1
vote
1 answer
componentWillReceiveProps not firing on router param change
I am using react-router-redux along with redux, react-router and react and have everything working quite well in this repo:
https://github.com/justsayno/redux-react-introduction-code/tree/issue-branch
(look in branch issue-branch for reproducting my…

sethreidnz
- 665
- 6
- 19
0
votes
0 answers
React Native router flux Router Scene Background image
Is there any way to set the background image for the React native redux router flux scene.
({ backgroundColor: 'transparent' })}>

Pearl
- 23
- 1
- 7
0
votes
1 answer
Post ID route showing up in other components
I am learning router and redux. I am trying to create a blog. Now the post ID route is showing up in other components like About and portfolio but not in home page because I have made it an exact…

ichiranjeeb
- 58
- 6