Skip to content

Instantly share code, notes, and snippets.

@nitish24p nitish24p/appClient.js
Last active Jan 18, 2018

Embed
What would you like to do?
Code splitting with Higher order Components
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
You can’t perform that action at this time.