React 실습
[React] jsx 문법 요령 - map을 이용하여 여러개의 태그 출력
코딩질문자
2023. 6. 8. 18:19
728x90
{!myOrderList[0]?.useCoupons || myOrderList[0]?.useCoupons.length === 0 ? '-' : (
<>
{myOrderList[0]?.useCoupons?.map((data) => (
<span>{data.title}</span>
))}
</>
)}
jsx 문법을 쓸때 다음과 같이 구현할 수 있음.
728x90