jsx내 일반방법
<a href={`https://baobab.scope.klaytn.com/nft/${userInfo.ua}/${e.tokenId}`} className="btn btn-primary">Go Klaytnscope</a>
jsx내 삼항연산자
<div className="col-sm-10">
<textarea type="userAddress" className="form-control form-control-sm" id="colFormLabelSm"
value={userInfo ? `Mard: ${userInfo.mard}\nNgit: ${userInfo.ngit}\nVngit: ${userInfo.vngit}\nMARD(gold): ${userInfo.gold}\nBongbong: ${userInfo.bongbong}\nBetting Ticket: ${userInfo.bettingTicket}` : ''}
readOnly/>
</div>
target="_blank"
반응형
'Frontend > React' 카테고리의 다른 글
useReducer 복잡한 상태관리 로직분리 (0) | 2023.04.07 |
---|---|
Context API 사용법 (0) | 2023.04.06 |
Context API _context undefined 에러 (0) | 2023.01.08 |
React option (0) | 2022.06.23 |
nextjs Link태그에 _blank (0) | 2022.06.10 |