-
Notifications
You must be signed in to change notification settings - Fork 19
Frontend Basic Principles Maximize Reusability
JC Quirin edited this page Jan 28, 2020
·
1 revision
As always, aim to follow DRY (Don't Repeat Yourself) principles. Whenever building new components, consider how they might be used in multiple contexts, and how you might build them to be modular and reusable. For instance, instead of building separate components for every form field on every form, we might build a TextField
component that handles the presentation/styling that is common for all and combos for our particular design system.
However, it's possible to go too far in abstraction, resulting in a mix of internal dependencies that make it difficult to change one section of the application without possibly negatively affecting another. DRY is a principle, not a dogma.