Replies: 1 comment
-
I have solved it by adding another MemoryRouter at the layout level |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
According to the react router documentation, I can use memory router to test the useLocation hook, however I am having the following problem when running my test:
🚩 Error: useLocation() may be used only in the context of a <Router> component.
Code:
Current test:
Beta Was this translation helpful? Give feedback.
All reactions