reactjs / reactjs/react.dev

Missing documentation

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

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

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

説明

I stumbled onto something that works but is not documented and I'd like to understand if it should be avoided.

The setup: Non react application renders various react components in few places.

I've noticed couple of components that do the following:

function Foo(props){
    return <div>
        Some content
        <div id="placeholder"></div>
    </div>
}
ReactDOM.render(<Foo/>, domRef)

Somewhere else in the application ReactDOM.render(<Bar/>, document.getElementById("placeholder")). The "placeholder" being the dom element rendered by the <Foo /> component.

I couldn't find anything in the React docs and Stackoverflow describing how/if this should work. Any light on the subject would be much appreciated.

I have also opened a this: https://stackoverflow.com/questions/66134211/reactdom-render-one-react-component-inside-the-render-tree-of-another

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

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

はじめの一歩

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

調査の方向性

issueで説明されているReactDOM.renderの例から始め、既存のReactドキュメントと比較します。別のコンポーネントによって生成されたDOM要素へのレンダリングがサポートされているのか、それとも避けるべきなのかを判断し、その指針をドキュメント化したうえで、ページがここで提起されたネストされたレンダリングのケースを扱っていることを確認します。

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

評価

技術スタック
javascript, react
領域
documentation, frontend
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
32/100

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

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