Last active
January 18, 2018 08:55
-
-
Save nitish24p/f3522a5c83621464f59a0609f9575231 to your computer and use it in GitHub Desktop.
Code splitting with Higher order Components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as RoutingConstants from './constants/RoutingConstants'; | |
import { Route, Switch } from 'react-router-dom'; | |
import AboutUs from './pages/AboutUs'; | |
import Products from './pages/Products'; | |
import Homepage from './pages/Homepage'; | |
import React, { Component } from 'react';; | |
class App extends Component<{}, {}> { | |
render() { | |
return ( | |
<div> | |
<Switch> | |
<Route exact path={'/'} component={Homepage} /> | |
<Route exact path={'/products'} component={Products} /> | |
<Route exact path={'/about-us'} component={AboutUs} /> | |
</Switch> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment