从理论上讲,它与Promise非常相似,除了它是有条件的。一个真正常见的用例是在加载主组件所依赖的数据时...
理论上,它与 Promise 的作用非常相似,只是它是有条件的。一个非常常见的用例是在加载主要组件所依赖的...
用一个哑组件、<Suspense/>组件和一个<ErrorBoundary/>组件测试自定义钩子。例如
You can also use theuseAssethook, which is modelled afterreact-promise-suspense. This makes it possible to define assets on the spot instead of having to define them externally. They use a global cache, anything you request at any time is written into it. ...