UNPKG

react-with-dynamic

Version:

Improved lazy loading in React with suspense and error boundary

4 lines (3 loc) 244 B
import React from 'react'; import type { Props } from './context'; export declare const withDynamic: ({ errorBoundaryProps, suspenseFallback, }?: Partial<Props>) => <T>(WrappedComponent: React.ComponentType<T>) => (props: T) => JSX.Element;