Chapter 1 · Practice 4 of 4
Teach through reviews, but mark lessons as optional
Why it matters
Reviews are one of the best ways to share knowledge: a language feature, a better library function, a pattern used elsewhere in the codebase. Google's guide encourages these comments, with one condition: if the point is not required for the change to be approved, say so.
Prefix teaching comments clearly:
Nit:a small polish point the author can choose to skipOptional:orConsider:an idea that is not requiredFYI:something useful to know for next time, no action needed
Without labels, authors often treat every comment as mandatory, and a review full of helpful tips turns into an exhausting list of required work.
Example
Nit: `items.length === 0` reads a little clearer than `!items.length` here.
FYI: there is a `formatMoney` helper in `lib/currency.ts` you can use next time.
No change needed in this PR.