Created
December 29, 2017 00:39
-
-
Save astrotim/12ca703033beaebaf2221bce83d5cc26 to your computer and use it in GitHub Desktop.
updated Post route in App.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 className="App-title">Welcome to React</h1> | |
- <Link to="/">Home</Link> <Link to="/post/">Post</Link> | |
</header> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
- <Route path="/post/" component={Post} /> | |
+ <Route path="/post/:id" component={Post} /> | |
</Switch> | |
</div> | |
</BrowserRouter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment