Router Provider & React Router createBrowserRouter #6381
Unanswered
writes-of-spring
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm attempting to use the new useHref options in the router provider combined with the React routers createBrowserRouter setup, so there's no component to nest the RouterProvider inside of.
I've tried following the pattern suggested in the Remix section of the docs, where it says to either add the provider per page or to add it to the root route, and adding to the root route of it doesn't seem to work as expected (however wrapping page inside does)
Has anyone else gotten it to work at the root route layout with the createBrowserRouter
the following component is a child of the root layout in the above
and will link to /{farmId} rather than farms/{farmId} as expected
wrapping the component in a RouterProvider addresses the issue.
thanks!
Beta Was this translation helpful? Give feedback.
All reactions