News for hackers. Stuff that matters.
Re:A Short Cautionary Tale About Refactoring by marshmellman on Sunday March 21, 2021 @03:03AM (#26528647)
> Luckily I spotted the issue before I pushed my branch ... I extracted the inlined image into a separate React component and used it where needed. This way we still get both benefits

I expected the author to mention adding a code comment so future maintainers don't make the same mistake.

Re:A Short Cautionary Tale About Refactoring by ziga-miklic on Sunday March 21, 2021 @05:17AM (#26529177)
The author here: Thank you for reading my post! You are correct - I should have. I missed adding a comment when creating the commits, but did include it in my recommendations in the paragraph just below the one you quoted:

> ...if there is a good reason for the current approach, document it. Add a more descriptive name or a comment to avoid confusion in the future.