This is an example of how you can incrementally migrate to Remix if you're using React Router. Here's the basic idea:
- Upgrade your React Router site to the latest version of React Router (find out how to do this iteratively).
- Install Remix and set up the conventional files of
app/{root,entry.client,entry.server}.tsx - Move all your existing code into a directory within the
appdirectory (likeapp/old-appfor example). - Remove
<BrowserRouter>from yourApp - Create a
app/routes/$.tsxfile with justexport { default } from "~/old-app/app";(or whatever file has the root component for your existing React Router app). - Remove all your old webpack build stuff and use the
remixCLI instead. Your builds are now outrageously fast. - Everything should work at this point (and it'll be server rendered too!!). Commit + push!
- Over time, move old routes to the
routesdirectory until you bring everything over. - You're done!
We'll have better docs and even videos about this in the future, but this is a pretty darn solid and iterative approach with quick wins and a clear path.