Skip to content

Commit f4d73f1

Browse files
riccardoperracoderabbitai[bot]autofix-ci[bot]KevinVandy
authored
feat: update @tanstack/store to v9 (#6180)
* feat: update @tanstack/store to v9 * Update packages/table-core/src/core/table/constructTable.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: lockfile * ci: apply automated fixes * bump package size limit * fix sherif issues * bump up memory of knip test runner --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
1 parent da372f6 commit f4d73f1

33 files changed

Lines changed: 481 additions & 689 deletions

File tree

examples/react/basic-external-state/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@faker-js/faker": "^10.2.0",
15-
"@tanstack/react-store": "^0.8.0",
15+
"@tanstack/react-store": "^0.9.1",
1616
"@tanstack/react-table": "^9.0.0-alpha.11",
1717
"react": "^19.2.4",
1818
"react-dom": "^19.2.4"

examples/react/basic-external-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@faker-js/faker": "^10.2.0",
15-
"@tanstack/react-store": "^0.8.0",
15+
"@tanstack/react-store": "^0.9.1",
1616
"@tanstack/react-table": "^9.0.0-alpha.11",
1717
"react": "^19.2.4",
1818
"react-dom": "^19.2.4"

examples/react/basic-external-store/src/main.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import ReactDOM from 'react-dom/client'
33
import './index.css'
4-
import { Store, useStore } from '@tanstack/react-store'
4+
import { createStore, useStore } from '@tanstack/react-store'
55
import {
66
createColumnHelper,
77
createPaginatedRowModel,
@@ -60,18 +60,17 @@ function App() {
6060
const rerender = React.useReducer(() => ({}), {})[1]
6161

6262
// create our own TanStack Store in our own scope (This could just be a global store if defined outside of this component)
63-
const [myTableStore] = React.useState(
64-
() =>
65-
new Store(
66-
getInitialTableState(
67-
_features, // get default initial state from features
68-
// custom initial state
69-
{
70-
sorting: [],
71-
pagination: { pageIndex: 0, pageSize: 10 },
72-
},
73-
),
63+
const [myTableStore] = React.useState(() =>
64+
createStore(
65+
getInitialTableState(
66+
_features, // get default initial state from features
67+
// custom initial state
68+
{
69+
sorting: [],
70+
pagination: { pageIndex: 0, pageSize: 10 },
71+
},
7472
),
73+
),
7574
)
7675

7776
// Subscribe to store state for reactive updates, custom selector available too

examples/react/composable-tables/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@faker-js/faker": "^10.2.0",
15-
"@tanstack/react-store": "^0.8.0",
15+
"@tanstack/react-store": "^0.9.1",
1616
"@tanstack/react-table": "^9.0.0-alpha.11",
1717
"react": "^19.2.4",
1818
"react-dom": "^19.2.4"

examples/react/pagination/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@faker-js/faker": "^10.2.0",
15-
"@tanstack/react-store": "^0.8.0",
15+
"@tanstack/react-store": "^0.9.1",
1616
"@tanstack/react-table": "^9.0.0-alpha.11",
1717
"react": "^19.2.4",
1818
"react-dom": "^19.2.4"

examples/react/row-selection/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"dependencies": {
1414
"@faker-js/faker": "^10.2.0",
15-
"@tanstack/react-store": "^0.8.0",
15+
"@tanstack/react-store": "^0.9.1",
1616
"@tanstack/react-table": "^9.0.0-alpha.11",
1717
"react": "^19.2.4",
1818
"react-dom": "^19.2.4"
1919
},
2020
"devDependencies": {
21+
"@rollup/plugin-replace": "^6.0.3",
2122
"@tanstack/react-devtools": "0.9.6",
2223
"@tanstack/react-table-devtools": "9.0.0-alpha.11",
23-
"@rollup/plugin-replace": "^6.0.3",
2424
"@types/react": "^19.2.10",
2525
"@types/react-dom": "^19.2.3",
2626
"@vitejs/plugin-react": "^5.1.2",

0 commit comments

Comments
 (0)