You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.
Let me preface this by saying that I'm really interested in this kit. I attempted a different one, before, but it had way more than what we needed and it just got in the way. I like the "just the basics" that you have in this kit. Thank you!
So I attempted to create my first route using this starter kit. Here's what I attempted:
import React from "react";
import {Router, Route, Link, browserHistory} from "react-router";
import Main from "./Main";
import Home from "./Home";
/**
* The React Router 1.0 routes for both the server and the client.
*/
module.exports = (
<Router history={browserHistory}>
<Route path="/" component={Main}>
<Route path="/about" component={Home}/>
</Route>
</Router>
);
However, that doesn't work? It's the example provided by react-router so I assumed it would. Instead I needed to do this:
import React from "react";
import {Router, Route, Link, browserHistory} from "react-router";
import Main from "./Main";
import Home from "./Home";
/**
* The React Router 1.0 routes for both the server and the client.
*/
module.exports = (
<Router history={browserHistory}>
<Route path="/" component={Main} />
<Route path="/about" component={Home}/>
</Router>
);
Did I do something wrong? '/about' didn't work until I changed the route code to be the bottom.
The text was updated successfully, but these errors were encountered:
Let me preface this by saying that I'm really interested in this kit. I attempted a different one, before, but it had way more than what we needed and it just got in the way. I like the "just the basics" that you have in this kit. Thank you!
So I attempted to create my first route using this starter kit. Here's what I attempted:
However, that doesn't work? It's the example provided by react-router so I assumed it would. Instead I needed to do this:
Did I do something wrong? '/about' didn't work until I changed the route code to be the bottom.
The text was updated successfully, but these errors were encountered: