@tanstack/react-router 1.92.3 → 1.92.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.92.3",
3
+ "version": "1.92.6",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "node": ">=12"
50
50
  },
51
51
  "dependencies": {
52
- "@tanstack/react-store": "^0.6.1",
52
+ "@tanstack/react-store": "^0.7.0",
53
53
  "jsesc": "^3.0.2",
54
54
  "tiny-invariant": "^1.3.3",
55
55
  "tiny-warning": "^1.0.3",
package/src/router.ts CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  createMemoryHistory,
4
4
  parseHref,
5
5
  } from '@tanstack/history'
6
- import { Store } from '@tanstack/react-store'
6
+ import { Store, batch } from '@tanstack/react-store'
7
7
  import invariant from 'tiny-invariant'
8
8
  import warning from 'tiny-warning'
9
9
  import { rootRouteId } from './root'
@@ -1959,7 +1959,7 @@ export class Router<
1959
1959
 
1960
1960
  let pendingMatches!: Array<AnyRouteMatch>
1961
1961
 
1962
- this.__store.batch(() => {
1962
+ batch(() => {
1963
1963
  // this call breaks a route context of destination route after a redirect
1964
1964
  // we should be fine not eagerly calling this since we call it later
1965
1965
  // this.clearExpiredCache()
@@ -2014,7 +2014,7 @@ export class Router<
2014
2014
  let enteringMatches!: Array<AnyRouteMatch>
2015
2015
  let stayingMatches!: Array<AnyRouteMatch>
2016
2016
 
2017
- this.__store.batch(() => {
2017
+ batch(() => {
2018
2018
  this.__store.setState((s) => {
2019
2019
  const previousMatches = s.matches
2020
2020
  const newMatches = s.pendingMatches || s.matches
@@ -2877,7 +2877,7 @@ export class Router<
2877
2877
  ])
2878
2878
 
2879
2879
  // If the matches are already loaded, we need to add them to the cachedMatches
2880
- this.__store.batch(() => {
2880
+ batch(() => {
2881
2881
  matches.forEach((match) => {
2882
2882
  if (!loadedMatchIds.has(match.id)) {
2883
2883
  this.__store.setState((s) => ({