[Typo]: The mechanism described in "Providing a fallback for server errors and client-only content" behaves differently in practice
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- javascript, react
調査の方向性
React Suspense のリファレンスセクション「Providing a fallback for server errors and client-only content」から始め、特にサーバーエラーとサーバーレンダリングをオプトアウトすることについての、引用されている 2 つの記述を確認してください。エラー 419 を含め、報告されている開発環境および本番環境での動作を再現または検証し、その後、セクションの説明が観測された動作と一致し、制限事項またはサポートされているアプローチを明確に示すよう更新してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
The section "Providing a fallback for server errors and client-only content" could be misleading when it comes to opting out of server-rendering.
Page
Details
The section "Providing a fallback for server errors and client-only content" seems to suggest that if a user wants to explicitly opt out a component/hook out of being rendered on the server, they can throw an error on the server, and when that same component successfully renders on the client, the error will not be surfaced to the user. I am specifically talking about the following statements:
However, if it does not error on the client, React will not display the error to the user since the content was eventually displayed successfully.
You can use this to opt out some components from rendering on the server. To do this, throw an error in the server environment and then wrap them in a boundary to replace their HTML with fallbacks:
That seems to be in opposition to how React behaves in practice. Both in development and in production, the error thrown on the server is surfaced to the developer, and (arguably) the end user through the browser console (Minified error description: https://react.dev/errors/419).
The seems to be no documented way to distinguish an intended opt-out from a user error, and if there is none, I feel like the documentation is a bit misleading.
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 16時間 6分
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reactjs/react.dev のほかの issue
-
type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
bug: unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
type: typos
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
bug: unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
reactjs/react.dev の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·