Skip to content

Instantly share code, notes, and snippets.

@AndrejGajdos
Created June 24, 2018 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrejGajdos/67386e94f76c53f6377714ea4e909828 to your computer and use it in GitHub Desktop.
Save AndrejGajdos/67386e94f76c53f6377714ea4e909828 to your computer and use it in GitHub Desktop.
import React from 'react';
import Loadable from 'react-loadable';
const Loading = () => (
<div />
);
export const AsyncAboutView = Loadable({
loader: () => import('about/AboutView'),
loading: () => <Loading />,
});
export const AsyncHomeView = Loadable({
loader: () => import('home/HomeView'),
loading: () => <Loading />,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment