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

1988 questions
0
votes
0 answers

Create React App skips router in public directory

I have an app created via Create React App. Inside the app in public directory is directory app-b with another SPA. When navigates to URL / the main app renders. When navigates to URL /app-b the second app renders. However, when navigates to URL…
0
votes
1 answer

React Router – replicate in fetched html

My project has a CMS system, which stores blocks in HTML format. Links in this HTML link to the existing routes, which are handled by ReactRouter. I need to somehow overwrite /category/123 of HTML's native link, in order to use ReactRouter build-in…
0
votes
1 answer

how to do history.push location inside axios interceptor with react react-router v4?

There is a need to push to a specific location say '/login' based on statuses inside interceptor. Is there a way to directly push to a location?
Mukundhan
  • 3,284
  • 23
  • 36
0
votes
0 answers

Protecting a group of routes with React Router 4

playing around with protected routes in React Router 4 and wondering whether something that I've been able to get to work is even possible.
Lee Hitchcock
  • 85
  • 1
  • 10
0
votes
1 answer

React - Failed prop type: The prop `history` is marked as required in `Router`, but its value is `undefined`

I am new to react and I am having a problem with router. I already tried several solutions and nothing went right. I would like to know if I'm doing something wrong with my file router or webpack-config, if anyone can help me I would be very…
0
votes
1 answer

i got a error about render Link component of react-router

In my simple app,one of my component need the Link component of react-router,like this:
  • javascript
  • python
  • java
when i import Link in this…
TinLen
  • 3
  • 2
0
votes
1 answer

Nested Switches and Default Subroutes with React Router 4

I keep getting the warning Warning: You tried to redirect to the same route you're currently on when trying to navigate to /articles//details. I currently have the following…
eightonrose
  • 688
  • 3
  • 14
  • 24
0
votes
2 answers

Heroku with React-Router and Create-React-App

This question has been asked multiple times, I have been reading the similar questions and attempting to resolve this issue with no luck so I am posting my code to see if a fresh pair of eyes can help solve my problem. My app works as expected on…
Jason McFarlane
  • 2,048
  • 3
  • 18
  • 30
0
votes
1 answer

Nested routes and Switch - how to pass props.match.params.id?

I have been trying to understand nested routes and switch in the React v4 Router. Consider the main router looks like this (simplified):
Kermit
  • 2,865
  • 3
  • 30
  • 53
0
votes
1 answer

How to clear the search parameter that caused the error?

Let's say I have a page that renders search results depending on the parameters in the URL like so: https://www.someurl.com/categories/somecategory?brands=brand1,brand2,brand3 Which results in the page showing only brand1, brand2, and brand3…
catandmouse
  • 11,309
  • 23
  • 92
  • 150
0
votes
0 answers

Can I rely on componentWillMount to process changes in query parameters?

Is it true, that each of exists browsers always will reload page completely if I change the query parameters in the address bar? If it's true I suppose, that I can rely at componentWillMount, because page always will be completely refreshing, but…
nitrovatter
  • 931
  • 4
  • 13
  • 30
0
votes
1 answer

React-Router Navigation Appearing Twice On path='/'

In the application the navigation appears single in all the pages except the home which is '/'. How do I prevent the navigation from appearing twice in the home. Here is a screenshot and the code for the react-router. Screen Shot OF Double Menu In…
0
votes
1 answer

react-router-dom v4. wrapper - does it need to be included in App tree?

So, I have observed one interesting thing when I uses the wrapper inside my App structure. It does not fires location change (@@router/LOCATION_CHANGE) action dispatch on each location change and does not update location props in…
0
votes
0 answers

Passing around data

My task is to create a SPA with an iTunes API. I got my basic functionality done but it's not SPA yet, i wanted to implement react-router to handle the navigation. However my components now need an extra parent. And i don't quite get it how can I…
0
votes
2 answers

execute route change from siblings component in React Router V4

I am learning React.js. I am using React router version 4.3.1 and React router dom 4.3.1. My current app structure is given below. {/* sidebar component */}
{/*…
ahnafscm
  • 97
  • 1
  • 1
  • 7
1 2 3
99
100