Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document creation of stateful react components

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react

調査の方向性

まず、React.Component、props、state、setInitState に関するソースコードの例を確認します。状態を持つ React コンポーネントで、F# において props と state を強く型付けして定義する方法を、関連するライフサイクルメソッドと想定されるオブジェクト形状を含めて文書化します。報告されている children の型エラーなしに、新規参加者が文書化された例に従えるようになれば完了です。

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

説明

I've spent some effort on creating a custom react component using props and state (including componentDidMount, componentWillReceiveProps, setState and such).

There's a few lines in source code suggesting to do something like:

type MyComponent(initialProps) =
    inherit React.Component<MyProps, MyState>(initialProps)
    base.setInitState({ value = 5 })
    ...

... that I tried to follow, but then I got issues with React reporting errors about component's Children being an object rather than react component and such.
I did fiddle something creating some Pojo objects for MyState and MyProps types, but I'm not really sure what I did and if I did it correctly (I was more like a monkey that somehow managed to write a Shakespeare novel).

It would be really nice to have the concept of strongly typed state and props described somewhere in the documentation.

主要言語
F#
スター
276
フォーク
65
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

fable-compiler/fable-react のほかの issue

fable-compiler/fable-react の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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