/plushcap/analysis/sonar/upgrading-react-18-sonarqube

Lessons learned upgrading to React 18 in SonarQube

What's this blog post about?

The SonarQube front-end team recently upgraded their app from React 17 to 18, using TypeScript and Jest with React Testing Library (RTL) for testing. They faced three main issues during the upgrade process: changes in TypeScript types, the need to update RTL, and breaking changes introduced by React 18. The team learned valuable lessons from these challenges, such as the importance of using Sebastian Silbermann's codemods to automatically update types when upgrading from React 17, addressing issues with fake timers in Jest, and understanding how automatic batching works in React 18. By sharing their experiences, they hope to help others who are planning similar upgrades.

Company
Sonar

Date published
Jan. 17, 2024

Author(s)
Phil Nash

Word count
1212

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.