Content Deep Dive
Lessons learned upgrading to React 18 in SonarQube
Blog post from Sonar
Post Details
Company
Date Published
Author
Phil Nash
Word Count
1,212
Language
English
Hacker News Points
-
Summary
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.