feat: Remove mutable props concept

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

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

@rwaskiewicz がすでに取り組んでいます。

2024年4月9日 から。

評価

この issue はまだ評価されていません。

説明

triage
Prerequisites
Describe the Feature Request

As it stands now, prop being mutable doesn't do anything other than suppress a warning about modifying a prop.
Is there a reason that warning was put in?
This seems like a needless behavior that only worsens DX, and makes testing components harder.

Describe the Use Case
  • Do two-way sync of props with external store
  • Modify props in tests
  • Reset prop values on hot-module-replacement
Describe Preferred Solution

Remove the useless warning

Describe Alternatives

OR deprecate the concept of non-mutable props
OR add a stencil config option to make all props mutable

Related Code

No response

Additional Information

Related to https://github.com/ionic-team/stencil/issues/3490

主要言語
TypeScript
スター
13.2k
フォーク
865
平均マージ
2日 16時間
マージ済み PR(30日)
29

環境構築

はじめの一歩

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

stenciljs/core のほかの issue

stenciljs/core の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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