dlgustn555 / onlyWiki

위키 전용으로 사용할 레포지토리 입니다.
0 stars 0 forks source link

[React] 스터디 #5

Open dlgustn555 opened 7 years ago

dlgustn555 commented 7 years ago
  1. 리액트 마다 하나의 root DOM node 를 가진다.
  2. 리액트 엘리먼트를 render 할땐 ReactDOM.render()를 사용한다.

image

dlgustn555 commented 7 years ago

React Compoents는 props를 통해 React Element에 임의로 input된 데이터를 접근할 수 있고, 화면에 그릴 ReactElement를 리턴한다.

image

dlgustn555 commented 7 years ago

1번 또는 2번 방식으로 사용 가능!! 하지만,

We generally recommend binding in the constructor or using the property initializer syntax,

image

dlgustn555 commented 7 years ago

map() 안에서 사용되어지는 컨포넌트에는 key를 항상 필요로 한다!!

sometingList.map((item) => (
 <Item key={item.toString()} value={item} />
));

image