Questions tagged [react-router-component]

110 questions
0
votes
1 answer

How to pass context and props to component in Reactjs

This is my requirement. When a route /xyz (displays xyz Component) is hit on browser, I need to navigate to separate route /abc (displays abc component). I also need to pass new props and context to the target component on navigation. I am looking…
Haritha
  • 1
  • 1
0
votes
1 answer

Hiding some navigation bar links in some of the react components: React+ React-Router+Typescript

I am a bit new to React. I have a situation where I need to hide some navigation bar links in some components where as in the rest, I want to display them. Actually been using react router V4 and typescript. Need to hide page1 and page2 links when…
joy08
  • 9,004
  • 8
  • 38
  • 73
0
votes
1 answer

Not getting props of Components in react-router

I want to use React Component to get id matches but it gives error when going to url : http://localhost:8080/portfolio/1 and run fine for other url. Error : GET http://localhost:8080/portfolio/bundle.js 404 (Not Found) 1:1 Refused to execute…
0
votes
1 answer

named path not working in react-router-dom react js

I am using react-router-dom for routing purposes. This is my code: //Libraries import React from 'react'; import { Tabs, Tab } from 'react-tabify'; import { connect } from 'react-redux'; import { BrowserRouter as Router, Route, …
0
votes
2 answers

React Router not working link to tag

I have three js files. The parent I am to call the child classes. The code goes like this. This is the parent class App.js import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import {FirstPage} from…
0
votes
2 answers

react-router v4 - How to provide params to a pure function using "component" attribute

I have the following code: const CatalogContainer = () => ( ( )} /> ) But ESLint is throwing the…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
0
votes
1 answer

Change tab content using router

I am making a react application. Can I change the "tab content area" on a button click using react-router. I have two tabs. I want to change content of one of the tab when I click a button. Everything else on the page should remain same but the…
EdG
  • 2,243
  • 6
  • 48
  • 103
0
votes
2 answers

React.js nesting stateless functional component in another stateless component results in: RangeError: Maximum call stack size exceeded

I have one component: import React from 'react'; import Footer from '../Footer'; import AddTodo from '../../containers/AddTodo'; import VisibleTodoList from '../../containers/VisibilityTodoList'; const App = () => (
ngoctranfire
  • 793
  • 9
  • 15
0
votes
1 answer

React Router Param

Is it possible to do this with react router? I want use different param with different component. I test above code and it…
Dhika
  • 29
  • 1
  • 4
0
votes
1 answer

React Router: Defining nested params, seems correct, but given useless error message

My goal is to define a nested url like so: /dashboard/modules/12242433 I was using this example to model my code: React Router Examples: dynamic-segments Here is my render method that defines my routes render((
fresh5447
  • 1,242
  • 3
  • 14
  • 27
0
votes
1 answer

react-router-component deep linking. Possible?

I experience some troubles with using of the react-router-component. The next code works fine at least for links like http://localhost:8080/#about: var App = React.createClass({ render: function() { return (
yurart
  • 593
  • 1
  • 6
  • 23
0
votes
2 answers

React.js tests TypeError: Cannot read property 'pushState' of undefined

I am trying to write tests for my React component. I am getting this error: TypeError: Cannot read property 'pushState' of undefined My code looks like this: "use strict"; var React = require('react'); var ProductAction =…
0
votes
1 answer

React Nested routing issue

my router looks like the following, [ { path: '/', component: App, childRoutes: [ { path: 'dashboard', getComponent: function(location, cb) { require.ensure([], function(require) { …
Gilson PJ
  • 3,443
  • 3
  • 32
  • 53
0
votes
1 answer

React-Router 1.0.0-rc4 - dynamic router - params not working

Problem: This dynamic router works, except when there is a dynamic link involving params. Specifically: I can hard code a link or type in the browser: All Vehicles …
user1177440
0
votes
1 answer

Rendering sub navigation using react router routes and a shared data source

I have a large application which I am soon to be switching to react-router 1.x. The application has a large nested navigation structure. / /page1 /page1/option1 /page1/option2 /page1/option3 /page1/option4 /page1/option4/option1 …
Tom
  • 12,591
  • 13
  • 72
  • 112