id 속성은 unique해야한다.
5rem -> 기본 폰트5배
#xxx -> id="xxx"인 것
.a -> class="a"인 것
tailwind는 클래스를 미리 만들어 둔 것이다.
//map으로 출력하기
function App() {
const links = [
{
text: "네이버",
href: "https://www.naver.com"
},
{
text: "다음",
href: "https://www.daum.net"
},
{
text: "구글",
href: "https://www.google.com"
},
{
text: "야후",
href: "https://www.yahoo.com"
}
];
return (
<ul>
{links.map(({ href, text }, index) => (
<li key={text} className="p-1">
<Link href={href} text={text} />
</li>
))}
</ul>
);
}
rootElement.render(<App />);