Type error in `useStore` when upgrading from 1.28.0 to 1.28.4
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンクされている最小再現から始めて pnpm build を実行し、src/App.tsx の useStore 呼び出しに焦点を当てます。バージョン 1.28.0 と 1.28.4 の間で関連する useStore の型を比較します。再現コードが TS2554 エラーなしでビルドされ、報告されている 1 引数での使用方法が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
We have a fair few places in our codebase where we have previously done
const formState = useStore(form.store);
which has worked fine until I just tried to upgrade to 1.28.4, where it now fails with
src/App.tsx:13:21 - error TS2554: Expected 2-3 arguments, but got 1.
13 const formState = useStore(form.store)
And yes, I know this is not how you're supposed to write it, but that's how it was written by the guy who wrote it.
Your minimal, reproducible example
https://github.com/sondr3/tanstack-react-form-types
Steps to reproduce
pnpm build- Observe type error
Expected behavior
No breaking changes in patch releases.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
N/A
TanStack Form adapter
react-form
TanStack Form version
1.28.4
TypeScript version
5.9.3
Additional context
No response
- 主要言語
- TypeScript
- スター
- 893
- フォーク
- 114
- 平均マージ
- 8日 14時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/store のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Missing atom docs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
`shallow` doesn't correctly compare different object instances if they only have property getters オープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/tanstack.com#1293 ·