import React, { Suspense, lazy } from 'react'; import PropTypes from 'prop-types'; const Loader = () =>
; function LazyLoad({ component: Component, ...props }) { return ( }> ); } LazyLoad.propTypes = { component: PropTypes.object }; export default function Loadable(loader) { const LazyComponent = lazy(loader); return function PureComponent(props) { return ; }; }