[2.x] Component helper for lazy loading components

オープン
#4,220 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
frontend, web-dev

調査の方向性

ファイル、テスト、エントリーポイントは指定されていません。まず既存のコンポーネントシステムと、コード分割されたコンポーネントのインポート方法を読みます。次に、インポート済みのコンポーネントとオプションの loader を渡すための API を決定します。インポートが解決される間、単一のコンポーネントがフォールバックコンテンツを表示でき、React Suspense のより広範な動作を必要としなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

type/extensibility

Similar to React's <Suspense> (but way less complex), pass a code split component and optionally a custom loader to show while it is being imported.

A simple "just loading" component could be fairly nice for components that don't need to be tightly integrated with the parent, just to avoid a lot of boilerplate loading indicators and stuff. Not necessarily as complicated as the Suspense as that goes deep in the children, but just for a single component.

Something like this (might make sense to do it some other way, but you get the idea)

<LazyComponent
    content={import('...')}>
    This text is shown while loading
</LazyComponent>

I could see this also being useful perhaps to just show a LoadingIndicator when the param loading is true, maybe. But that's not the focus.

主要言語
PHP
スター
6.8k
フォーク
891
平均マージ
1日 10時間
マージ済み PR(30日)
209

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flarum/framework のほかの issue

flarum/framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。