Issue with migrating existing React router based app to Remix #3450
-
I was trying to migrate my existing React router app to Remix based on this guide: I am facing a problem with routes that are part of react router (inside
The setup I have is exactly same as shown here https://github.com/kentcdodds/incremental-react-router-to-remix-upgrade-path With only one difference, it's inside a monorepo. I have tried all basic troubleshooting steps and I have removed all additional stuff from This is how my import React from 'react'
import { Routes, Route } from 'react-router-dom'
function App(): React.ReactElement {
return (
<div>
<Routes>
<Route path="/page1" element={<p>Hello World</p>} />
</Routes>
</div>
)
}
export default App Any help / insights will really be helpful as I am kind of stuck here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The root behind this, the app was using two different instance of React router. As mentioned it's a monorepo, there was two different React router inside node modules which caused the issue. React router is suppose to be used as singleton. A better error message here would have been helpful. Just like React which clearly points this kind of error. |
Beta Was this translation helpful? Give feedback.
The root behind this, the app was using two different instance of React router.
As mentioned it's a monorepo, there was two different React router inside node modules which caused the issue. React router is suppose to be used as singleton.
A better error message here would have been helpful. Just like React which clearly points this kind of error.