Skip to content
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

Placing Devtools alongside RouterProvider prints multiple warnings #3723

Open
flashblaze opened this issue Mar 10, 2025 · 4 comments
Open

Placing Devtools alongside RouterProvider prints multiple warnings #3723

flashblaze opened this issue Mar 10, 2025 · 4 comments
Labels
information needed Further information is requested

Comments

@flashblaze
Copy link

flashblaze commented Mar 10, 2025

Which project does this relate to?

Router

Describe the bug

Based on Manually passing the Router instance, below code should work

function App() {
  return (
    <>
      <RouterProvider router={router} />
      <TanStackRouterDevtools router={router} />
    </>
  )
}

However, I'm seeing these warnings in the UI
Warning: useRouter must be used inside a <RouterProvider> component!

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-grpvtzfd?file=src%2FApp.tsx

Steps to Reproduce the Bug or Issue

  1. Open the app and check console, you'll see multiple warnings
  2. Commenting out the Devtools import fixes the warnings not being shown

Expected behavior

I should not see any warnings

Screenshots or Videos

No response

Platform

  • OS: All
  • Browser: All
  • Version: All

Additional context

No response

@schiller-manuel
Copy link
Contributor

cannot reproduce anymore with latest versions. do you still see this?

@schiller-manuel schiller-manuel added the information needed Further information is requested label Mar 10, 2025
@birkskyum
Copy link
Member

birkskyum commented Mar 10, 2025

@schiller-manuel , I see this warning in the browser console. I believe it's still there.

Image

@xsjcTony
Copy link

Yep, can confirm it's still there with the latest version, with @tanstack/react-router-devtools.
Version: 1.114.17

Image

@xsjcTony
Copy link

A lot of warnings will be printed on every single navigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information needed Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants