import React , { FC , Suspense } from 'react' ; import { EuiErrorBoundary } from '@elastic/eui' ; import { VegaChartLoading } from './vega_chart_loading' ; import type { VegaChartViewProps } from './vega_chart_view' ; const VegaChartView = React . lazy ( ( ) => import ( './vega_chart_view' ) ) ; export const VegaChart = ( props ) => ( < EuiErrorBoundary > < Suspense fallback = { < VegaChartLoading / > } > < VegaChartView { ... props } / > < /Suspense> < /EuiErrorBoundary>);