Skip to content

Instantly share code, notes, and snippets.

@astrotim astrotim/App.js.diff
Created Dec 29, 2017

Embed
What would you like to do?
updated Post route in App.js
<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
You can’t perform that action at this time.