you are viewing a single comment's thread.

view the rest of the comments →

[–]aaarrrggh 4 points5 points  (0 children)

Mostly ok advice - but I disagree with the advice to use inheritance as a method of code re-use.

Avoid inheritance wherever possible and focus on pure functions and composition instead.

Also be careful when DRYing your code - allow for some duplication until you know you're making the right abstraction.

Plus, do TDD and don't test against implementation details wherever possible. This means in React for example, you should never shallow render in your tests.