Skip to content

Commit ed19d5d

Browse files
Ryan HamblinRyan Hamblin
authored andcommitted
added in new steps
1 parent 9a27d64 commit ed19d5d

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Topics:
1818
* Step 1: `import { BrowserRouter as Router } from 'react-router-dom';` inside your `index.js` file.
1919
* Step 2: Wrap your `<App />` component that you're passing to `ReactDOM.render()` with your `<Router> </Router>` component.
2020
* Step 3: open up your chrome `REACT DEV TOOLS` and notice your app is now all wrapped in `BrowserRouter`
21-
* Step 4: inside the `REACT DEV TOOLS` expand `<BrowserRouter>` and highlight `<Router>` and notice that here is a `"history"` object on props
21+
* Step 4: inside the `REACT DEV TOOLS` expand `<BrowserRouter>` and highlight `<Router>` and notice that here is a `"history"` object on props.
22+
* Step 5: inside of your `App.js` file `import { Route } from 'react-router-dom';`
23+
- this is where we're going to declare and specify our router.
24+
* Step 6: create 3 `<Route />` setting their `to` equal to `/`, `/about`, `/contact` with their respective components
2225

2326

2427

‎src/App.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import React, { Component } from 'react';
22
import './App.css';
33
import Navigation from './components/Navigation';
44

5-
const App = () => <Navigation />;
6-
5+
const App = () => (
6+
<div>
7+
<Navigation />
8+
</div>
9+
)
710

811
export default App;

‎src/components/index.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Home from './Home';
2+
import About from './About';
3+
import Contact from './Contact';
4+
5+
export {
6+
Home,
7+
About,
8+
Contact,
9+
};

0 commit comments

Comments
 (0)