Questions tagged [react-router-component]
110 questions
0
votes
0 answers
How can I render 4th stage react child components in 1st stage parent component's
I'm new to react and react routing. I'm building a website. and while routing, I'm facing some problems as my home component is rendered in the app components along with the topbar, navbar, footer, and others components. Like below...
import React…

SakibAshraf
- 1
- 1
0
votes
0 answers
The imported CSS file and the dependencies became available in all of the components in React.Js
When I import a css file or a dependency in one component in react it became available in all the other components where I do not want to import them so how can I fix this to make the imported file only available in the same component that I…

Mohamad Amjad
- 19
- 1
- 9
0
votes
1 answer
Unexpected behaviour in React Js Routing between Pages
Here i'm implementing a simple routing program to route between pages in react js. I'm experiencing unexpected behaviour on run time.
Here is my App.js Code
import LoginPage from './LoginPage'
import React from 'react';
import Home from…

Leia
- 11
- 4
0
votes
1 answer
BrowserRouter does not render view of another component in the same page
I am having a very simple app with Carousel. Each slide has a button. When the user clicks on the buttons, it should show the corresponding page at the bottom container. I am passing individual Slide from the parent component as a property called…

Seeker
- 163
- 1
- 12
0
votes
1 answer
react router query param string loads the default page '/'
enter image description here
I have a scenario need to load the component with a query parameter. if load flowPage/1234 the component loads correctly.
But if i load flowPage/1234/investigation its load a default page
Note: 1234 is an queryparameter

karthikeyan raman
- 1
- 1
- 3
0
votes
1 answer
React nested routing not working properly
I am creating Frontend for Django application. I want to route my app component into following.
/
/dashboard
/about
/contact
then the dashboard component should route as
/dashboard/
/dashboard/notification/
/dashboard/profile/
I successfully…

Abhiram P Jayan
- 339
- 5
- 16
0
votes
0 answers
Can react router and maps be used to create an add new page function?
I am fairly new to react but doing well! I am looking to build a simple 'add' profile application. My UX designs include the following flow:
Home page (with add new page button)
Opens a blank page (with a save button that returns to home page)
Home…

pedrohasabeard
- 45
- 4
0
votes
1 answer
Route inside Route - nesting routes - react.js
I have been looking for an answer to my question on github already, but nothing works for me..
My problem is that when I use Link in Reservation component it changes the path, but doesn't change change the visible component and the page become…

nightspite
- 101
- 1
- 8
0
votes
1 answer
In react Router i cant change the view but only the url is changing
Please tell me what's wrong in this when I am clicking on nav link the url is changing but the content is not changing
I am trying all the ways but can't figure out the problem, please have a look at this
App.js
import React, { Component } from…

Rohit doddapani
- 21
- 5
0
votes
0 answers
React Router active Class for home page
I've got a navigation that I am having a hard time trying to style. I have been able to add active classes to the navigational elements and apply styles to them, however the main dashboard which functions as a homepage does not get the dedicated…

Mike Manusama
- 89
- 3
- 10
0
votes
1 answer
React-router-dom: Very simple nested routing does not work
I have searched through different tutorials and multiple stackOverflow questions. And none of which, helped me solve a very basic problem:
Implement nested routes with react-router-dom
Here's my code so far:
App.js

AG_HIHI
- 1,705
- 5
- 27
- 69
0
votes
2 answers
Load react component in a different div than the one containing its link
I have a page with a header, footer and sidebar. The App.js file is as follows -
const App = () => {
return(
…

sindhugauri
- 189
- 2
- 14
0
votes
2 answers
Is it possible to abstract the Link declarations when using React-Router?
Consider the following:
import { Route, Link, Switch } from "react-router-dom";
import { Redirect } from 'react-router'
function Index() {
return
Home
; } function About() { returnAbout
; } function Users() { return…
Antonio Pavicevac-Ortiz
- 7,239
- 17
- 68
- 141
0
votes
1 answer
Redirect to a page from a search form in React using React Router
Expected: On every page, I have a search form. When submitted, it will show the fetched data.
Occurs: When I submit the form, I receive a TypeError: dataItems is undefined
Here's my app component
class App extends Component {
render() {
…

Dave.Q
- 369
- 1
- 6
- 21
0
votes
0 answers
Mapped Component passed in React Router returns 'map' error
This is my file Structure
./src
./components
Tabnav.js
CharacterList.js
App.js
In my App.js file, I used Axios to fetch data from an Api, then I returned the 'CharacterList' component, passing it the properties gotten from the fetch results.…

Evans I.
- 11
- 4