Skip to content

Instantly share code, notes, and snippets.

@astrotim
Created December 29, 2017 00:39

Revisions

  1. Tim Holt revised this gist Dec 29, 2017. 1 changed file with 1 addition and 8 deletions.
    9 changes: 1 addition & 8 deletions App.js.diff
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,3 @@
    diff --git a/src/App.js b/src/App.js
    index f7d722b..93cfd00 100644
    --- a/src/App.js
    +++ b/src/App.js
    @@ -15,11 +15,10 @@ class App extends Component {
    <img src={logo} className="App-logo" alt="logo" />
    </Link>
    <h1 className="App-title">Welcome to React</h1>
    - <Link to="/">Home</Link> <Link to="/post/">Post</Link>
    </header>
    @@ -14,4 +7,4 @@ index f7d722b..93cfd00 100644
    + <Route path="/post/:id" component={Post} />
    </Switch>
    </div>
    </BrowserRouter>
    </BrowserRouter>
  2. Tim Holt created this gist Dec 29, 2017.
    17 changes: 17 additions & 0 deletions App.js.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    diff --git a/src/App.js b/src/App.js
    index f7d722b..93cfd00 100644
    --- a/src/App.js
    +++ b/src/App.js
    @@ -15,11 +15,10 @@ class App extends Component {
    <img src={logo} className="App-logo" alt="logo" />
    </Link>
    <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>