✔ React에서 component를 표시할 때 함수로 만듦
✔ 함수의 이름은 App 이라는 대문자로 시작
✔ React가 component를 인식하기 위해서는 return할때 JSX 문법 사용
✔ JSX는 HTML처럼 사용
✔ 만약 다수의 태그를 반환하고 싶다면 빈 태그 or div 태그 이용해서 부모 태그로 묶어서 반환
function App(){
return(
<>
<h1>hello</h1>
<h2>bye</h2>
<>);
}
✔ html -> class, React -> className
// javascript
function App(){
return(
<>
<h1 className="orange">hello</h1>
<h2>bye</h2>
<>);
}
// css
.orange{
color: orange;
}