Upgrade or Rewrite?

When is it worth a "re-write"? For context, I'm looking at a 2 year old React project I built that several developer hands have been in while I've been on other projects, but no one has really been upgrading. When I do some minor upgrades all kinds of fun errors come out of the woodwork during unit tests and builds. As I work through it and find myself in dependency hell, I'm contemplating just starting up a new shell and copying components and code over. Just wanted others opinions on how that went for them, if they chose that path in the past. Thanks!
3 Replies
cje
cje15mo ago
If your rewrite isn’t incremental, it will fail For any non trivial application
iammorganparry
iammorganparry15mo ago
Depends on the scale, impact to business etc. one of the biggest downsides to rewrites is missed or removed (albeit not deliberately) business logic that can have a big impact. So as the post above says, it was almost certainly be a bad idea if it’s non trivial. The best approach is incremental
Etan
Etan15mo ago
What is "upgrade"? Is a refactor out of the question? Typically when random errors pops up from changes, that indicates tightly coupled code. Instead of a re-write, can just refactor parts that are messy. Great for incremental changes and you should be able to rely on your unit tests for safety
Want results from more Discord servers?
Add your server