React suspense/lazy delay?

后端 未结 5 1681
醉话见心
醉话见心 2020-12-05 18:13

I am trying to use the new React Lazy and Suspense to create a fallback loading component. This works great, but the fallback is showing only a few ms. Is there a way to add

5条回答
  •  孤街浪徒
    2020-12-05 18:39

    I faced similar problem moreover I was using TypeScript along with React. So, I had to respect typescript compiler as well & I went ahead with an approach having an infinite delay along with no complain from typescript as well. Promise that never resolved

提交回复
热议问题