Questions tagged [connected-react-router]

connected-react-router allows the binding of the react-router state with the redux store.

Developer documentation and resources:

94 questions
0
votes
0 answers

How do i manage custom props like 'isInnerPage' within router reducer?

I use connected-react-router and have some types of pages: main, inner, auth, admin. Depends of current page type I render certain components. Now it works in this way: there are 4 props in my config reducer with bool values: isMainPage,…
0
votes
0 answers

React Router Dom - How to redirect between dynamic route

class Recommended extends Component { componentDidMount() {} render() { return (
0
votes
2 answers

React-router component does not update on navigation

As many other people have had the same issue, I'm struggling to interact with a element to change routes and render a new component. I am able to click on the link and the path for my application changes in my redux store, but no component…
reZach
  • 8,945
  • 12
  • 51
  • 97
0
votes
1 answer

Keep looping between the last two routes on this simple React app

I have a very simple project you can find on: https://codesandbox.io/s/issue-looping-between-last-2-routes-xhxu1 On file: /src/store/middlewares.ts I have the following middlewares: import { Dispatch, Middleware, AnyAction } from "redux"; import {…
Viewsonic
  • 827
  • 2
  • 15
  • 34
0
votes
0 answers

How can I access match.params from within a Redux Thunk action?

How can I do something similar to the below, without manually passing data into the function from a component? function doSomething() return (dispatch, getState) => { console.log(getState().router.match.params) } } The reason this is…
0
votes
0 answers

React router - #/ getting added to query paramter

In my react application if I am sending a query parameter like localhost:8000/?param1=value1, it gets converted to localhost:8000/?param1=value1#/. I am new to this not really sure how it works. ConnectedRouter is being used :
hack
  • 1,403
  • 2
  • 14
  • 20
0
votes
1 answer

React-Router with redux-persist

After updating most packages in my react project, I can no longer figure out what changed to make redux-persist work when using connected-react-router (updated from react-redux-router which is now deprecated). I've tried looking at guides online but…
cclloyd
  • 8,171
  • 16
  • 57
  • 104
0
votes
2 answers

Refresh a page in a single page application

Let's say that you receive a link that takes you to a page from a single page application. You want to be able to see that page instantly (of course, if you are logged in). The issue is that the data is not fetched from the server, so the page is…
0
votes
1 answer

Could not find router reducer in state tree, it must be mounted under "router" when combining with redux-persist

I'm trying to add redux-persist to my web app based on react boilerplate 4. I've followed the documentation but getting the error Could not find router reducer in state tree, it must be mounted under "router". Changes implemented: In…
0
votes
1 answer

Redux-persist Implementation in React / connected-react-router

I implemented redux-persist to connected-react-router. At first, everything seemed to work. Redux store is connected to local storage and it persists states. But I realized when I open the link (http://localhost:9080/reset?token=###) from my email…
Jiaah
  • 758
  • 2
  • 11
  • 29
0
votes
2 answers

React-router v5 updates the URL but doesn't render nested component

I created an application using react, react-router, react-redux, connected-react-router and I have the following structure: - app - admin - category - categoryList - categoryAdd My idea is to execute the following app flow: /admin…
Breno Teixeira
  • 3,860
  • 2
  • 19
  • 17
0
votes
1 answer

Using react router inside redux

If we wanted to change route programatically inside redux, we used to use react-router-redux npm package. However it was archived by its author. Now the recommended solution is connected-react-router:…
Patrickkx
  • 1,740
  • 7
  • 31
  • 60
0
votes
1 answer

Navbar is not re-rendering on router location change

I want to display userName and changed the button text to 'logout' from 'login' in Navbar(nav component) when user is logged in. I tired to re-render the Nav Component by pushing the router history location to homepage on user logged in.…
Jiaah
  • 758
  • 2
  • 11
  • 29
0
votes
1 answer

ReactJS - Props not been pass to component

I have an application with react-router-dom, connected-react-router and react-redux, I have all of them updated to the latest stable version available. Right now for some reason, the store is not being passed to the children component of…
0
votes
2 answers

connected-react-router push is called nothing happens

There is a Login component // @flow import type { TState as TAuth, } from '../redux'; import * as React from 'react'; import Button from '@material-ui/core/Button'; import FormControl from '@material-ui/core/FormControl'; import Input from…