강의

멘토링

커뮤니티

Inflearn Community Q&A

seongho60225477's profile image
seongho60225477

asked

MERN STACK Community: React from Start to Deployment

React Bootstrap

<a> cannot appear as a descendant of <a>

Written on

·

441

1

안녕하세요 강의 잘 듣고 있습니다!
 
콘솔에
<a> cannot appear as a descendant of <a>
라는 오류가 떠서요..
 
bootstrap Nav.link 내부에 라우터 Link를 넣어서 그런 것 같습니다.
 
bootstrap 의 링Nav링크 스타일을 이용하면서 라우터 link를 사용하려면 어떻게 해야하나요?
 
Nav.Link의 href에 주소를 넣으면 클릭시 새로고침되면서 이동됩니다 ㅠ
 
--------------------------------------------------------
찾아보니 Link 태그를 직접 사용하지말고
<Nav.Link as={Link} to="/">
이런식으로 사용하라고하네요!!
자문자답 ;;
mongodbexpressreactfirebasenodejs

Answer 1

0

<Nav.Link as={Link} to="/" style={{color : "white", textDecoration : "none"}}>
home
</Nav.Link>
 
이런식으로 입력하시면 될거애요
seongho60225477's profile image
seongho60225477

asked

Ask a question