You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React.lazy takes a function that must call a dynamic import(). This must return a Promise which resolves to a module with a default export containing a React component.
React-tabs doesn't do that; it uses named exports and does so from one file. Even if you did manage to get each component (Tabs, TabList, Tab, and TabPanel) as a separate Promise that resolves to a component, you still wouldn't be able to nest them all within the one <Suspense> — the package just wasn't made with <Suspense> in mind. If you really want to lazy-load react-tabs, I think you'd be better off using a bare import('react-tabs') and use some other mechanism to wait for that to resolve before rendering.
I am not able to consume this when trying to lazy load. My code is below. I request you to please help me in this.
const { Tab, Tabs, TabList, TabPanel } = lazy(() => import('react-tabs'));
The text was updated successfully, but these errors were encountered: