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

[FEATURE] Using a remote config value with a generic type

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

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

2023年6月29日 から。

評価

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

説明

feature request v5

When using JSON in remote config parameter, we have to parse by ourselves the JSON, could be cleaner with generic type?

Current usage

interface MyAwesomeRemoteConfigParameter {
    buttonColor: "blue" | "red";
    autoDestruction: boolean;
}

const {data: myParamJsonString} = useRemoteConfigString("my_awesome_remote_config_parameter");
const myParam: MyAwesomeRemoteConfigParameter | undefined = myParamJsonString ? 
    JSON.parse(myParamJsonString) :
    undefined;

Desired usage

interface MyAwesomeRemoteConfigParameter {
    buttonColor: "blue" | "red";
    autoDestruction: boolean;
}

const {data: myParam} = useRemoteConfigValue<MyAwesomeRemoteConfigParameter>("my_awesome_remote_config_parameter");
// myParam is parsed with MyAwesomeRemoteConfigParameter interface
主要言語
TypeScript
スター
3.6k
フォーク
403
平均マージ
5日 1時間
マージ済み PR(30日)
10

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

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

はじめの一歩

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

FirebaseExtended/reactfire のほかの issue

FirebaseExtended/reactfire の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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