App.js
477 Bytes
import React from 'react';
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import Landing from './Landing';
class App extends React.Component {
render() {
return (
<Router>
<Switch>
<Route exact path="/landing" component={Landing} />
<Redirect path="*" to="/landing" />
</Switch>
</Router>
);
}
}
export default App;