Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 1.09 KB

README.md

File metadata and controls

7 lines (4 loc) · 1.09 KB

SOLID principles for React.js

SOLID principles were created for the object-oriented programming for improving maintainability, scalability, and extensibility, and they rely heavily on concepts of classes and interfaces. Both of which are not present in the JavaScript since it's “classes” are merely a syntactic sugar with a prototype system underneath and interfaces are completely missing from vanilla JavaScript but can be used via TypeScript which has fortunately become a de facto standard in the modern frontend. Even more, React code is leaning much more to the functional programming than to the object-oriented

But these design principles can still be applied to the frontend since they have a high level of abstraction and are pretty much language and application agnostic.

By applying them, we create modular, maintainable, and extensible application that are easier to understand, test, and evolve over time. These principles will help us in structuring our components in a way that promotes separation of concerns, code reuse, and flexibility, resulting in more robust and scalable applications.