개발하고 싶은 초심자
[React] Uncaught Error: useRoutes() may be used only in the context of a <Router> component. 본문
기술개념정리(in Javascript)/개발&에러핸들링(in Work(Codestates))
[React] Uncaught Error: useRoutes() may be used only in the context of a <Router> component.
정새얀 2023. 2. 18. 22:18퇴사 후 자꾸 써먹지 않으면 머리가 굳어버릴 것 같아 다시 한 번 이것 저것 기본적인 부분들부터 만들어보고 있었는데, 에러 메시지가 나왔다.
Uncaught Error: useRoutes() may be used only in the context of a <Router> component.
useRoutes는 <Router>로 감싸야합니다, 라고 나왔는데...
App.js에서 <Routes>를 <Router>로 감싸주지 않아 나온 에러였다. 정말 기본적인 부분이라서 놓친 것에 대해 어이가 없었지만, 그만큼 내가 기본적인 부분도 놓칠 정도였구나 싶어 더 열심히 해야겠다 다짐하게 되었다.
'기술개념정리(in Javascript) > 개발&에러핸들링(in Work(Codestates))' 카테고리의 다른 글
[CSS] flex: 1; 이 뭘까? (0) | 2023.02.19 |
---|---|
[CSS] 밑줄과 밑줄의 길이를 변경하고 싶을 때 (0) | 2023.02.19 |
[React] 배열에서 인덱스가 밀리는 이유 (0) | 2023.01.11 |
[Error] Jump target cannot cross function boundary (0) | 2023.01.09 |
[DOM] 자식요소 중 일부를 제외하고 삭제하는 방법 (0) | 2023.01.09 |
Comments