UNPKG

animiassumenda

Version:

Blox live, desktop app for managing staking accounts

14 lines (10 loc) 310 B
import React, { lazy, Suspense } from 'react'; const loadable = (importFunc, { fallback = null } = { fallback: null }) => { const LazyComponent = lazy(importFunc); return (props) => ( <Suspense fallback={fallback}> <LazyComponent {...props} /> </Suspense> ); }; export default loadable;