@tanstack/react-router-devtools 0.0.1-beta.77 → 0.0.1-beta.79

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/react-router-devtools",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.77",
4
+ "version": "0.0.1-beta.79",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router/",
@@ -42,6 +42,6 @@
42
42
  "dependencies": {
43
43
  "@babel/runtime": "^7.16.7",
44
44
  "date-fns": "^2.29.1",
45
- "@tanstack/react-router": "0.0.1-beta.77"
45
+ "@tanstack/react-router": "0.0.1-beta.79"
46
46
  }
47
47
  }
package/src/devtools.tsx CHANGED
@@ -1,11 +1,11 @@
1
1
  import React from 'react'
2
2
  import {
3
- Router,
4
3
  last,
5
4
  routerContext,
6
5
  invariant,
7
6
  useRouter,
8
7
  AnyRouter,
8
+ useStore,
9
9
  } from '@tanstack/react-router'
10
10
 
11
11
  import useLocalStorage from './useLocalStorage'
@@ -424,7 +424,7 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
424
424
  'No router was found for the TanStack Router Devtools. Please place the devtools in the <RouterProvider> component tree or pass the router instance to the devtools manually.',
425
425
  )
426
426
 
427
- useRouter()
427
+ useStore(router.__store)
428
428
 
429
429
  const [activeRouteId, setActiveRouteId] = useLocalStorage(
430
430
  'tanstackRouterDevtoolsActiveRouteId',
@@ -452,19 +452,6 @@ export const TanStackRouterDevtoolsPanel = React.forwardRef<
452
452
  allMatches?.find((d) => d.id === activeMatchId) ||
453
453
  allMatches?.find((d) => d.route.id === activeRouteId)
454
454
 
455
- // const matchCacheValues = multiSortBy(
456
- // Object.keys(router.state.matchCache)
457
- // .filter((key) => {
458
- // const cacheEntry = router.state.matchCache[key]!
459
- // return cacheEntry.gc > Date.now()
460
- // })
461
- // .map((key) => router.state.matchCache[key]!),
462
- // [
463
- // (d) => (d.match.state.isFetching ? -1 : 1),
464
- // (d) => -d.match.state.updatedAt!,
465
- // ],
466
- // )
467
-
468
455
  return (
469
456
  <ThemeProvider theme={theme}>
470
457
  <Panel ref={ref} className="TanStackRouterDevtoolsPanel" {...panelProps}>