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
// new way in react 16.6importReact,{lazy,Suspense}from'react';importLoadingIndicatorfrom'./components/LoadingIndicator';/** * set component by importing it like Loadable */constComponent=lazy(()=>import('./ComponentExample'));exportdefault()=>(/** * Fallback is the Loading component; spinner or whatever we want to pass * * Suspense is the wrapper used to container everything exported * * Pass the component wrapped in lazy() as a children of <Suspense/> * */<Suspensefallback={<LoadingIndicator/>}><Component/></Suspense>);
@types/react has not been updated to v16.6, currently its at v16.4.14 yet so imports in typescript from { lazy, Suspense } will error out since they're not define.
types are being lost due to how React-Loadable imports components
The text was updated successfully, but these errors were encountered: