Chapter 8 of 8 · 4 practices · 2 min · 4-question quiz
Project hygiene
Habits that keep a React codebase easy to work in as it grows: types, structure, Strict Mode and staying current.
Start: Use TypeScript in strict mode and type your props4 practices in this chapter
- 1Use TypeScript in strict mode and type your propsTypeScript catches wrong props, missing cases and null values before they reach users, and it makes refactors safe. Turn on
strictintsconfig.jsonfrom the start; enabling it later on a large… - 2Keep StrictMode on for the whole app in developmentWrapping your app in
<StrictMode>adds checks that run only in development: components render twice; effects run twice; deprecated APIs trigger warnings - 3Group files by feature, not by file typeA
components/,hooks/,utils/split works for tiny apps but scatters one feature across many folders as the app grows. - 4Upgrade React regularly and read the release notesSmall, frequent upgrades are easier than one big jump. React minor releases such as 19.3 add stable features, for example View Transitions and Fragment Refs, and fix bugs that may be affecting you.
Check yourself on this chapter
4 questions, right here once you are signed in. Your progress is saved as you read.