Problem Statement
React Router 6.4 introduced Data API, with 3 new ways to initialize a router:
We should support usage of createHashRouter for users that prefer it over createBrowserRouter.
Solution Brainstorm
Implementation should be fairly similar to createBrowserRouter, we should still be able to subscribe routing events.
Also need to check:
- How would route parameterization work with hash urls?
- Do we need a URL parser, or can we get declarative route info from subscription?
Alternatively we can also consider writing a wrapper for <RouterProvider>, which all three types of routers are rendered in.
Problem Statement
React Router 6.4 introduced Data API, with 3 new ways to initialize a router:
createBrowserRouter: feat(react): Add tracing support for React Router 6.4createBrowserRouter. #6172createMemoryRouteralso covered by feat(react): Add tracing support for React Router 6.4createBrowserRouter. #6172createHashRouterWe should support usage of
createHashRouterfor users that prefer it overcreateBrowserRouter.Solution Brainstorm
Implementation should be fairly similar to
createBrowserRouter, we should still be able to subscribe routing events.Also need to check:
Alternatively we can also consider writing a wrapper for
<RouterProvider>, which all three types of routers are rendered in.