<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Refactoring on Severin Bucher | Blog</title><link>https://severinbucher.com/tags/refactoring/</link><description>Recent content in Refactoring on Severin Bucher | Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 26 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://severinbucher.com/tags/refactoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Enabling TypeScript Strict Mode in a Legacy React Project: A Gradual Approach</title><link>https://severinbucher.com/posts/enabling-typescript-strict-mode-in-a-legacy-react-project/</link><pubDate>Wed, 26 Mar 2025 00:00:00 +0000</pubDate><guid>https://severinbucher.com/posts/enabling-typescript-strict-mode-in-a-legacy-react-project/</guid><description>&lt;p>Our App was created in 2017. It is a React application written in TypeScript. At the time, TypeScript was gaining popularity, but strict type safety wasn&amp;rsquo;t a major concern for most teams. Our knowledge of TypeScript was limited, and the primary goal was to use it for basic type annotations rather than enforcing a fully type-safe codebase.&lt;/p>
&lt;p>As a result, strict mode was never turned on. The codebase ran without the safeguards strict mode brings: strict null checks, no implicit &lt;code>any&lt;/code>, and tighter type inference. As the project grew, that gap started to cost us. Subtle bugs slipped through, and refactoring carried more risk than it should have.&lt;/p></description></item></channel></rss>