Skip to content

Instantly share code, notes, and snippets.

@alexbenic
Last active June 23, 2018 11:02
Show Gist options
  • Save alexbenic/b70194e9aeef8ff9831e791e21d8ea81 to your computer and use it in GitHub Desktop.
Save alexbenic/b70194e9aeef8ff9831e791e21d8ea81 to your computer and use it in GitHub Desktop.

Revisions

  1. alexbenic revised this gist Jun 23, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion react-router.jsx
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,8 @@ render() {
    return (
    <Router>
    <Switch>
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/"
    render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
  2. alexbenic revised this gist Jun 23, 2018. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions react-router.jsx
    Original file line number Diff line number Diff line change
    @@ -2,11 +2,11 @@ render() {
    return (
    <Router>
    <Switch>
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
    <Route component={NotFound} />
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
    <Route component={NotFound} />
    </Switch>
    </Router>
    );
  3. alexbenic revised this gist Jun 23, 2018. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions react-router.jsx
    Original file line number Diff line number Diff line change
    @@ -2,11 +2,11 @@ render() {
    return (
    <Router>
    <Switch>
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
    <Route component={NotFound} />
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
    <Route component={NotFound} />
    </Switch>
    </Router>
    );
  4. alexbenic created this gist Jun 23, 2018.
    13 changes: 13 additions & 0 deletions react-router.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    render() {
    return (
    <Router>
    <Switch>
    <Route exact path="/" render={() => <Redirect to="/one" />} />
    <Route exact path="/one" component={Lorem} />
    <Route exact path="/two" component={Lorem} />
    <Route exact path="/three" component={Lorem} />
    <Route component={NotFound} />
    </Switch>
    </Router>
    );
    }