Tanstack v9 still doesn't really support react compiler
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンクされた StackBlitz の再現、特に src/App.tsx から始め、React 19.2.8 と TanStack Table 9.1.2 を使用します。無関係な hook を追加すると React Compiler の動作がどのように変化するかを確認し、そのうえで、結果がその無関係な変更に依存しない、コンパイラに安全なテーブルの動作を定義して検証します。
索引モデルが issue の本文から書いたものです。
説明
TanStack Table version
9.1.2
Framework/Library version
React 19.2.8
Describe the bug and the steps to reproduce it
Tanstack table uses internally mutable state, something that goes against Reacts immutability assumptions. This creates issues with the react compiler. v9 tries to make it work with the compiler by making the table object a non stable object. This happens to work out in many cases, not because it now follows the rules of react but because exactly how the compiler currently reason about those rules often shake out that way. Depending on internal implementation details like this and advocating for your users to leave the compiler on for components using tanstack table seem irresponsible as a future version of the compiler could suddenly break your users apps.
The attached stackblitz shows how sending a value to a completely unrelated hook can cause react compiler to make different decisions, breaking something that previously worked out. To me this demonstrates that what tanstack table is doing is still fundamentally breaking the react compilers rules and could break at any time.
This is causing issues with Octane as well as it wants to rely on similar assumptions as the react compiler for its optimizations. That is probably not your issue to solve but mentioning it as well as it was through investigating weird decisions around memoization in Octane that I discovered this issue. https://github.com/octanejs/octane/issues/846#issuecomment-5432084415
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/vitejs-vite-deapj37r?file=src%2FApp.tsx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- 主要言語
- TypeScript
- スター
- 28.4k
- フォーク
- 3.6k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/table のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100