Created
September 3, 2018 21:25
-
-
Save IchrakMansour/dd1e0a9428e5f6db1cd9c038a37440fa to your computer and use it in GitHub Desktop.
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 React from 'react'; | |
import Loadable from 'react-loadable' | |
import DefaultLayout from './containers/DefaultLayout'; | |
function Loading() { | |
return <div>Loading...</div>; | |
} | |
const Dashboard = Loadable({ | |
loader: () => | |
import ('./views/Dashboard'), | |
loading: Loading, | |
}); | |
const routes = [{ path: '/', exact: true, name: 'Home', component: DefaultLayout }, | |
{ path: '/dashboard', name: 'Dashboard', component: Dashboard } ]; | |
export default routes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment