Compat Router not working with SSR #9910
Unanswered
bhavin-a
asked this question in
v5 to v6 Migration
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We were trying to slowly migrate to the v6 with the compat library. But as soon as we changed code in the express server, we faced the below issue:
Looking at the code, it seems like,
CompatRouter
is usinguseHistory
and I don't know how to populate that.Our server code is:
<StaticRouter basename={"/app"} location={req.url} > <CompatRouter> <App /> </CompatRouter> </StaticRouter>
,where
StaticRouter
andCompatRouter
is fromimport { StaticRouter, CompatRouter } from "react-router-dom-v5-compat";
Wanted to know if I am missing something really stupid here. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions