Top "React-router" questions

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

react-router-dom with TypeScript

I'm trying to use react router with TypeScript. However, I have certain problems using withRouter function. On the last line, …

reactjs typescript react-router react-router-v4 react-router-redux
Using React IndexRoute in react-router v4

I'm learning React myself with online tutorial. So this is a basic example about using React Router: <Router history={…

javascript node.js reactjs react-router react-router-v4
Use anchors with react-router

How can I use react-router, and have a link navigate to a particular place on a particular page? (e.g. /…

javascript reactjs routes react-router anchor
Prop is marked as required in component, but its value is `undefined`

single.js : import React, { Component } from 'react'; import Details from '../components/details' import { ProgressBar } from 'react-materialize'; import { Route, Link } …

javascript reactjs react-router react-proptypes
React-Router only one child

I keep on getting the error: A 'Router' may have only one child element when using react-router. I can't seem …

javascript reactjs react-router
React Router v4 Redirect not working

I have a route which redirects after checking a condition like this <Route exact path="/" render={()=>( Store.isFirstTime ? &…

javascript reactjs react-router react-router-v4
Invariant Violation: You should not use <Switch> outside a <Router>

I have a problem that I don't know how to solve, I get this error when running npm test Invariant …

javascript reactjs react-router
React, Uncaught ReferenceError: ReactDOM is not defined

I am doing this Router tutorial. My App.jsx file: import React from 'react'; import ReactDOM from 'react-dom'; import { Router, …

javascript reactjs react-router web-component
onEnter not called in React-Router

Ok, I'm fed up trying. The onEnter method doesn't work. Any idea why is that? // Authentication "before" filter function requireAuth(…

javascript reactjs react-router react-router-v4
React wrapper: React does not recognize the `staticContext` prop on a DOM element

I'm trying to create a wrapper component around the react-router-dom NavLink component. I would like my custom component to accept …

reactjs react-router react-router-dom