
react CDN 사용 중에 button에 style을 적용하려고 코드를 작성했다
function Btn({ text, backgrounColor, fonsSize }) {
return (
<button style={{ backgrounColor: backgrounColor, color: "black", fonsSize: "20px" }}>{text}</button>
)
}
function App() {
return (
<>
<Btn text="안녕" backgroundColor="tomato" fonsSize={20} />
<Btn text="world" backgroundColor="tomato" fonsSize={20} />
</>
)
}
에러는 뜨지 않는데 화면에 적용은 안돼서, chatGPT에 에러를 물어보기로 했다

위 사진과 같이 적용되지 않는 이유와 수정된 코드를 알려주었다
