반응형 리액트 라우터2 useHref() may be used only in the context of a <Router> component. 문제원인 리액트 라우터를 사용할 때 컴포넌트를 바깥쪽에서 사용하여 생긴 문제이다. 라우터 바깥에 있으니 Link가 가리키는 곳이 어딘지 몰라 에러가 나는 것이다. 해결방법 를 라우터 안쪽으로 옮겨주면 해결된다 2022. 9. 19. React Router v6.4 튜토리얼 배우기 https://reactrouter.com/en/main/start/tutorial Tutorial Tutorial Welcome to the tutorial! We'll be building a small, but feature-rich app that let's you keep track of your contacts. We expect it to take between 30-60m if you're following along. 👉 Every time you see this it means you need to do something in t reactrouter.com All images and contents from above link 양이 조금 방대해서, 순서나 내용에 오류가 조금 있을 수 .. 2022. 9. 16. 이전 1 다음 반응형