Components Are Building Blocks
React Apps Are Built By Combining Components
리액트로 만들어진 어플리케이션은 컴포넌트들의 집합이다.
컴포넌트는 복잡성과 상관없이 무조건 사용하게 된다.
리액트에서만 사용하는 특별한 개념은 아니다.
React Component => Wrap HTML + CSS + JS
- Reusable Building Blocks
- create small building blocks & compose the UI from them
- If needed: Reuse a building block in different parts of the UI
- Related Code Lives Together
- Related HTML & JS(and possibly CSS) code is stored together
- Since JS influences the output, storing JS + HTML together makes sense
- Separation of Concerns
- Different components handle different data & logic
- Vastly simplifies the process of working on complex apps