![](https://cdn-ak-scissors.b.st-hatena.com/image/square/27a8667b1e76f0302e741150a72655f4d9bc6274/height=288;version=1;width=512/https%3A%2F%2Fstorage.googleapis.com%2Fzenn-user-upload%2Favatar%2Fa20870e495.jpeg)
エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
副作用のある処理を待ってから Component を描画したい
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
副作用のある処理を待ってから Component を描画したい
副作用(非同期)の完了を待ってからComponentの描画なると、Suspence か〜となる 僕は、Suspence を使... 副作用(非同期)の完了を待ってからComponentの描画なると、Suspence か〜となる 僕は、Suspence を使うとき React.lazy でしか使ったことが無いがなんとかなるじゃろと思い実装してみた React.lazy のジグネチャは function lazy<T extends ComponentType<any>>( factory: () => Promise<{ default: T }> ): LazyExoticComponent<T>; const LoadMSW = lazy(async () => { const component = { default: ({ children }: { children: React.ReactNode }) => { return children }, } if (process.env.NODE_ENV !