Open source is free, but upgrades require caution. They have risks, but if you understand what each upgrade includes (fix/feat/breaking change), risks can be reduced. Long term, tech must keep up with the times, especially during product iterations.
The web project I’m working on entered a new iteration, so I upgraded the framework over the weekend.
Motivation
Upgrading isn’t just about changing version numbers. It’s about the changes behind them: features, performance, patterns.
Here are areas I care about most.
Key areas of concern
TypeScript
- Optional chaining
We used to write:
user.sayHello&&user.sayHello();
Now we can write:
user?.sayHello();
- Nullish coalescing
We used to write:
const username=pete.username||alan.username
Now we can write:
const username=pete.username??alan.username
Isn’t this the same? No. If the value is 0, || treats it as false, while ?? only treats null/undefined as empty. So they differ.
React
- Scheduler
- lazy / Suspense
- Hooks
Other benefits
- Newer versions have better docs and bug tracking.
- Newer antd versions bring features.
- react-redux v7 claims significant performance improvements.
Issues encountered
Upgrading is never just version changes - there are pitfalls. Here are a few.
Optional chaining caused lint errors
New TypeScript syntax caused lint failures, so lint tooling must be upgraded.
Prettier new default changes
Note:
trailingComma: none
react-dom and react version alignment
When upgrading these two, ensure versions match or errors occur.
There were also minor issues, like type errors after upgrading Antd, which were fixed case by case.
Packages upgraded
- TypeScript
~3.3.1 => ~3.8.3 - react
16.4.2=> 16.8.3 - react-dom
16.4.2 => 16.8.3 - react-redux
6.0.1 => 7.2.0 - antd
3.20.0=>3.26.13 - prettier
1.14.3=>^2.0.5 - tslint
5.18.0=>^6.1.1 - tslint-react
4.0.0=>^5.0.0
Final Thoughts
After upgrading, basic tests passed - perfect.
Upgrades are always about finding pitfalls, stepping into them, and then fixing them. But the benefits are clear:
- More future possibilities because the tech is updated
- Smooth upgrades mean deeper understanding of the stack
So, just do it.

