-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[v6] Can't use useRoutes hook with Router component #7541
Comments
kcsujeet
changed the title
Can't use useRoutes hook with Router component
[v6] Can't use useRoutes hook with Router component
Aug 4, 2020
You have to provide the |
This was referenced Jan 12, 2021
@knuxbbs Have you found a solution to this lol? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
6.0.0-beta.0
Steps to reproduce
import Router from 'react-router-dom' instead of BrowserRouter
use useRoutes hook to build routes object as shown here
Expected Behavior
Everything should work fine
Actual Behavior
Getting this error instead
Error: useRoutes() may be used only in the context of a < Router > component
The text was updated successfully, but these errors were encountered: