5 DRY Principles to Follow in …

Highlights

    1. Composition of Components

I guess this is a no-brainer. But oftentimes people starting with react fail to understand the most powerful feature of React. That is Reusable Component

Always try to break down components into smaller pieces. It has multiple benefits.

  1. It improves code quality and readability

  2. Same UI components are not duplicated across the project

  • *Note: 1. 组件的组成

我猜这很容易理解。但是,很多刚开始使用React的人都没有理解React最强大的特性,那就是可重复使用的组件。

总是尝试将组件分解为更小的部分。它有多重好处。

  1. 它提高了代码质量和可读性

  2. 相同的UI组件不会在项目中重复出现。*