Photo by Mike van Schoonderwalt from Pexels
Photo by Mike van Schoonderwalt from Pexels

SOLID principles were developed to help the longevity of your code, but they are not simple to understand and even more difficult to apply to frontend development. Use this article as a quick reference guide on how to start applying the SOLID principles to your React+Typescript project.

Single-responsibility principle

A class should only have a single responsibility, that is, only changes to one part of the software’s specification should be able to affect the specification of the class.

Complexity and size are always related to low cohesion, but it’s hard to decide how many responsibilities a component should have. …

Eduardo Moniz

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store