reactjs / reactjs/react.dev

[Beta] Use Server Components

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

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

主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

This is not actually feasible yet but it would be nice to prepare so that when they're stable-ish in Next, we can use them.

I started a branch in https://github.com/reactjs/reactjs.org/tree/sc which only has http://localhost:3000/apis/usestate and http://localhost:3000/learn/props stubs which I use for testing.

I've ran into a few things already:

  • Basic stub
  • Shared components can't import client components (https://github.com/vercel/next.js/issues/34594), seems like a big problem for any serious code conversion
  • Actually renaming the files (it would be nice to have a script to do that)
    • We can actually do this before adopting SC so that by the time they're out, it's easy to switch. I.e. let's try to convert the site to use .client for things that need to be client components, and to follow SC rules. And then see how far we can keep things on the server, i.e. how many files don't really need .client if we do a bit of refactoring.
  • There's no support for SSG, it seems, yet. Next generates something with server runtime. Not sure when SSG is on the roadmap (if at all?)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず sc ブランチとその /apis/usestate および /learn/props スタブを確認し、次に共有コンポーネントと SSG に関するリンク先の Next.js の制限事項を確認します。この Issue ではファイルやテストが指定されていないため、完了には .client へのリネーム、Server Components の採用、SSG のサポートについて合意したスコープが必要です。

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

評価

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

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

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