summaryrefslogtreecommitdiff
path: root/src/components/Loadable.js
blob: 65843a1d80429afe61ddd13d436a65088e10d1b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import L from 'react-loadable';

import Loading from './Loading';

// error will passed if the component failed to load
// const Loading = ({ error }) => <div>loading</div>;

const Loadable = opts =>
  L({
    loading: Loading,
    delay: 200,
    ...opts
  });

export default Loadable;