Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//
import {
Route,
Link,
Switch,
Redirect
} from 'react-router-dom'
//
class App extends Component {
render() {
return (
<div className="App-intro">
<Switch>
<Route exact path="/" component={Home} />
<Route path="/messages" component={Messages} />
<Route path="/about" component={About} />
<Redirect to="/" />
</Switch>
</div>
</div>
);
}
}
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.