Next.js Discord

Discord Forum

Migrating legacy project to Next.js

Unanswered
Australian Freshwater Crocodile posted this in #help-forum
Open in Discord
Avatar
Australian Freshwater CrocodileOP
Hey guys, I'm investigating an option to migrate legacy SPA project to Next.js. Turns out, it's not that easy because we need to change a lot of stuff: project structure, data fetching, hydration mismatches, technical debt and so on

I was wondering if you guys could share your stories how you did it and pitfalls you faced during this process because I'm pretty much lost by know 🙂

The project I'm thinking to migrate uses latest React with hooks so it's not that much of legacy

3 Replies

Avatar
Gharial
Unfortunately there isn't really an easy way to do it. When I wanted to migrate from the pages to app router, I found it a lot easier to just start a new repo and rebuild slowly using the old code as a reference rather than trying to convert it. Obviously that's not always an option, but if you're migrating an old react SPA, it's probably going to be the fastest and easiest way
Avatar
Australian Freshwater CrocodileOP
Yup, totally understand that it's not easy. But still, would be nice to hear the experience of others, especially pitfalls 🙂
Avatar
Australian Freshwater CrocodileOP
Bump