Questions tagged [react-router-v4]

React Router - A complete routing library for React inspired by Ember's routing system

Introduction

React Router is a powerful routing library built on top of React that helps you add new screens and flows to your application incredibly quickly, all while keeping the URL in sync with what's being displayed on the page.


Docs


Related tags

1983 questions
0
votes
2 answers

react router 4 ambiguous match within same level of path

what is the best way i can render the correct compoment with those ambiguous path, currently it always fall in the the first match no matter what value has been pass.
kymwei
  • 1
0
votes
1 answer

trying to use link inside my react app but facing an issue

I am new to React and I am trying to display a link using react-router. When I use my code in my local environment the it works, but when I use in another environment (for example in stackblitz) it doesn't work and I am getting this error: You…
user10509524
0
votes
1 answer

How to use child route inside default route by using exact

Here is my code Problem is if I am calling login…
amitchauh4n
  • 972
  • 2
  • 11
  • 16
0
votes
2 answers

react router nav links not updating on route change

I have a component with header and sidebar which wraps the routers of my application, the problem I'm having is that are not updating on the route change assuming that the cause of this problem is that they are above the router and hence…
0
votes
2 answers

Changing props history causes redirect loop React

Here is my code in my component: class MyComp extends React.Component { componentDidMount(){ this._isMounted = true; axios.get(URL). then(res => { if(this._isMounted) { if(res=="ok") …
Tobi
  • 45
  • 1
  • 9
0
votes
0 answers

Query Params in the react router 4

I am totally new to the react router. I have this route where I set a param as a job. So I do in action like this history.push({ pathname: '/quiz-setup', search:…
ganesh kaspate
  • 667
  • 7
  • 20
0
votes
0 answers
0
votes
1 answer

Simple navigation with react router [gone wrong]

I started working on my engineering thesis and decided to write it as SPA in React that communicates with REST API on a ASP.NET Core backend. So far I have done a couple of apps using ASP.NET MVC and Winforms, but I wanted to broaden my knowledge…
0
votes
1 answer

Handling Refreshtoken with React Router PrivateRoute

I am using React-Router V4 and I want to hand over an 'authenticated' prop to decide wether to send the user to a login page or to the requested page: PrivateRoute.js import React from "react"; import { Route, Redirect, } from…
Maximilian Kindshofer
  • 2,333
  • 3
  • 17
  • 31
0
votes
1 answer

React Not Found rendering server side

I use React Router v4 and this works well. Okay, if I access the domain /blabla NotFound component renders well. But I wonder…
JuntaeKim
  • 5,364
  • 15
  • 54
  • 97
0
votes
0 answers

React Router + SSR + Hydrate

I have a route that "internally" to our server configuration points to: { path: '/product/:sku', component: Product, }, we have some "magic" happen with nginx proxies that routes an external 'search engine friendly url (SEF)' to point at…
Flakx
  • 982
  • 2
  • 14
  • 25
0
votes
1 answer

Prevent React Router Link from automatically generating the path of the location

Maybe I'm missing something, but I'm stuck with React Router Link and the path it's generating on the other location than '/'. To put it simple, when I'm on home ('/'), everything's okay, but when I am on the location (for example)…
user7494224
0
votes
1 answer

Securing routes in react?

class SecuredRoute extends Component { constructor(props) { super(props); this.state = { reputationNumber: 0, } this.getReputationNumber = this.getReputationNumber.bind(this); } componentWillUnmount() { …
0
votes
1 answer

Load Async reducers and sagas in react-boilerplate with React router v4

I am looking at migrating a project to the latest react-boilerplate version and many modules have changed. I am having trouble with React router v4 to play with my reducers and sagas. I looked at Dynamically load redux reducers with react router…
webmedia
  • 303
  • 1
  • 3
  • 8
0
votes
0 answers

Unknown 301 Redirect React Router

I'm working on a project with React Router trying to build a WordPress theme that is entirely React on the frontend. Everything seems to be working correctly when navigating throughout the app as expected. However, I have a /blog which maps to a…
1 2 3
99
100