File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ import React, { Component } from 'react';
22import './App.css' ;
33import Navigation from './components/Navigation' ;
44
5- const App = ( ) => < Navigation /> ;
6-
5+ const App = ( ) => (
6+ < div >
7+ < Navigation />
8+ </ div >
9+ )
710
811export default App ;
Original file line number Diff line number Diff line change 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+ } ;
You can’t perform that action at this time.
0 commit comments