Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Router may render a single route #308

Open
DarkNightRises opened this issue Mar 19, 2017 · 2 comments
Open

Router may render a single route #308

DarkNightRises opened this issue Mar 19, 2017 · 2 comments

Comments

@DarkNightRises
Copy link

Multipke routes not working under a single router as given under Lesson 2 . I have installed the latest version of react-router but always getting Router must render a single route

@ghostsquad
Copy link

Can you provide the snippet of your code that's not working?

@cjones26
Copy link

cjones26 commented Feb 14, 2018

import React from 'react';
import { render } from 'react-dom';
import App from './modules/App';
import Repos from './modules/Repos';
import About from './modules/About';
import { Router, Route, hashHistory } from 'react-router';

render(
  <Router history={hashHistory}>
    <Route path="/" component={App} />

    <Route path="/repos" component={Repos} />
    <Route Path="/about" component={About} />
  </Router>,
  document.getElementById('app')
);

I have this in my App.js and the code does not work for me when attempting to hit: http://localhost:8080/#/about:

Warning: [react-router] Location "/about" did not match any routes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants