1. Components

cheonbi·2024년 12월 8일
0

React

목록 보기
2/11

Components Are Building Blocks

React Apps Are Built By Combining Components
리액트로 만들어진 어플리케이션은 컴포넌트들의 집합이다.

컴포넌트는 복잡성과 상관없이 무조건 사용하게 된다.

리액트에서만 사용하는 특별한 개념은 아니다.

React Component => Wrap HTML + CSS + JS

  1. Reusable Building Blocks
  • create small building blocks & compose the UI from them
  • If needed: Reuse a building block in different parts of the UI
  1. 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
  1. Separation of Concerns
  • Different components handle different data & logic
  • Vastly simplifies the process of working on complex apps
profile
༼ つ ◕_◕ ༽つ

0개의 댓글