safe-react/src/utils/wrapInSuspense.tsx

6 lines
164 B
TypeScript

import React from 'react'
export const wrapInSuspense = (component: any, fallback?: any) => (
<React.Suspense fallback={fallback}>{component}</React.Suspense>
)