router icon indicating copy to clipboard operation
router copied to clipboard

TanStackRouterDevtools outside of the RouterProvider

Open ceiger89 opened this issue 1 year ago • 1 comments

Describe the bug

I came across some non-functional aspects of the documentation. One of them is the DevTool outside the provider.

It's not working: https://tanstack.com/router/v1/docs/devtools#manually-passing-the-router-instance

I'm providing an example based on the basic code.

I get in console Warning: useRouter must be used inside a <RouterProvider> component!

Your Example Website or App

https://codesandbox.io/p/devbox/tanstack-router-devtools-outside-6hdrys

Steps to Reproduce the Bug or Issue

  1. Copy code from documentation

Expected behavior

It should work, both the devtools and routing.

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

ceiger89 avatar Jan 23 '24 09:01 ceiger89

@tannerlinsley bumped to 1.14.5 and its still not working: demo

nklhtv avatar Jan 28 '24 21:01 nklhtv

FWIW, the dupe I opened shows it still broken in 1.17.5

happycollision avatar Mar 01 '24 21:03 happycollision