-
Notifications
You must be signed in to change notification settings - Fork 1
fix(deps): update dependency @tanstack/react-table to v9 #1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/major-tanstack-table-monorepo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: fuf-stack/pixels
Length of output: 8606
🌐 Web query:
site:tanstack.com/table v9 migration useReactTable useTable@tanstack/react-table9.2.4💡 Result:
In TanStack Table v9, the primary hook for creating a table instance has been renamed from
useReactTabletouseTable[1][2]. This change ensures naming consistency across the library's various framework adapters [1]. Key migration steps and changes in v9 include: 1. Hook Renaming: Replace instances ofuseReactTablewithuseTable[1][2]. 2. Required Features: Unlike v8, where all features were bundled by default, v9 requires explicit registration of features to enable tree-shaking and improve performance [1][3]. You must now use thefeaturesoption along withtableFeatures({})to include only the functionality you need (e.g., sorting, filtering, pagination) [4][3]. 3. Legacy Compatibility: If you need to migrate incrementally, v9 provides a deprecateduseLegacyTablehook [1][5]. This hook accepts v8-style APIs and includes all features by default, but it results in a larger bundle size and is intended only as a temporary transition aid [1][5]. 4. State Management: State management in v9 has been overhauled to use an atomic model built on TanStack Store, allowing for more granular reactivity and subscription patterns [6][3]. For a complete migration, you should reference the official TanStack Table v9 migration guide, which details feature-specific breaking changes and the new atomic state subscription model [1][2][6].Citations:
🏁 Script executed:
Repository: fuf-stack/pixels
Length of output: 4271
🌐 Web query:
TanStack Table v9.2.4 official migration guide useReactTable useTable💡 Result:
TanStack Table v9.2.4 is a stable, major release [1]. If you are migrating from v8 to v9, you should consult the official migration guide located at: https://tanstack.com/table/latest/docs/framework/react/guide/migrating [2][3]. Regarding the hooks: 1. useReactTable (React): In TanStack Table v9,
useReactTableremains the primary hook for the React adapter [4][2]. It has been updated to align with the new v9 architecture, which requires explicit declaration of features and row models [2][5]. 2. useTable (Preact): In the Preact adapter, the hook is nameduseTable(as opposed touseReactTablein the React adapter) [6]. If you are migrating from an older Preact setup that usedpreact/compatto access the React adapter, you should switch to the native@tanstack/preact-tableadapter and use theuseTablehook [6]. Key migration points for v9 include: - Requiredfeaturesoption: You must now explicitly define which features your table uses (e.g., sorting, pagination) [2][5]. You can usestockFeaturesfor a shortcut to v8-like behavior [2][7]. - Row Model Factories: Row models and their processing functions (filterFns,sortFns, etc.) are now configured as slots within the newtableFeaturesoption rather than through individualget*RowModelprops [2][5][6]. - Incremental Migration: AuseLegacyTablehook is available as a temporary aid to support v8-style APIs while running v9 under the hood, though it is intended for short-term use and is not recommended for long-term maintenance [2][7].Citations:
🌐 Web query:
site:tanstack.com/table/v9/docs/framework/react/guide/migrating "@tanstack/react-table" "useReactTable" "useLegacyTable"💡 Result:
In
@tanstack/react-table, useReactTable and useLegacyTable serve different purposes, primarily related to migration between major versions [1]. useReactTable is the primary hook used for initializing a table instance in the current version of the library (Table V9) [1]. Note that as part of the transition to V9, the hook name was updated to useTable in some contexts, but it remains the standard entry point for defining table logic, features, and row models [1]. In V9, you must explicitly import and provide the specific features and models you need, allowing for a smaller bundle size [1]. useLegacyTable is a temporary, deprecated utility hook provided specifically to assist with migrating from Table V8 to Table V9 [1]. It allows you to continue using the V8-style API while running the V9 core underneath [1]. Because it includes all features by default to maintain compatibility with the legacy API structure, using this hook will result in a larger bundle size than the standard V9 approach [1]. To access it, you must import it from the legacy-specific path:@tanstack/react-table/legacy[1]. It is intended solely as a migration aid and should be replaced with the standard V9 hooks as soon as possible [1].Citations:
🌐 Web query:
TanStack official v9 React adapter useReactTable useLegacyTable stockFeatures migration💡 Result:
In TanStack Table v9, the React adapter has undergone significant architectural changes to support tree-shaking and improved performance [1][2]. Key Migration Details: 1. Hook Name Change: The primary hook for creating a table instance is now useTable, replacing the v8 useReactTable hook [2][3][4]. 2. Explicit Feature Declaration: Unlike v8, where all features were bundled by default, v9 requires explicit registration of features to keep bundle sizes small [1][2]. You must use the tableFeatures utility to define which capabilities your table needs [5][2]. 3. useLegacyTable: This hook is a deprecated compatibility layer specifically designed to assist with incremental migrations from v8 [6]. It accepts v8-style table options and internally maps them to the v9 API using stockFeatures [6][7]. Because it includes all features by default, it does not provide the bundle size or performance benefits of the native v9 API and is intended only as a temporary measure [8][6]. 4. stockFeatures: This is a convenience export that includes the complete collection of optional features [1][3]. While it mimics the "everything-included" behavior of v8, it is less efficient for bundle size than importing individual features [1][6]. It is primarily useful for prototypes or when migrating using useLegacyTable [1][6]. Migration Checklist: - Replace useReactTable with useTable [2][4]. - Replace legacy get*RowModel options with explicit feature slots in the features object (e.g., filteredRowModel: createFilteredRowModel) [2][4][7]. - Migrate state access, as v9 uses fine-grained state updates (often via table.state or individual selectors) rather than the broad re-renders of v8 [2][8][6]. - Plan to remove useLegacyTable entirely in favor of the optimized, tree-shakeable v9 API to benefit from reduced bundle size and granular reactivity [8][6].
Citations:
🏁 Script executed:
Repository: fuf-stack/pixels
Length of output: 908
🏁 Script executed:
Repository: fuf-stack/pixels
Length of output: 1260
🏁 Script executed:
Repository: fuf-stack/pixels
Length of output: 2292
Migrate the table consumers before upgrading to v9.
useDataTableController.tsximports and callsuseReactTablefrom@tanstack/react-table, but v9 exportsuseTablefrom the package root instead. This import can fail compilation. Migrate the controller to the v9useTableand feature APIs, or switch the v8-compatible imports and call to@tanstack/react-table/legacyanduseLegacyTable.🤖 Prompt for AI Agents