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

Router may render a single route #308

Open

Description

@DarkNightRises

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

Activity

  1. ghostsquad commented on Jul 25, 2017

    @ghostsquad

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

  2. cjones26 commented on Feb 14, 2018

    @cjones26
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions