dukDukz
Uncaught Error: Invariant failed: You should not use <Switch> outside a <Router> 본문
웹 개발/React
Uncaught Error: Invariant failed: You should not use <Switch> outside a <Router>
헤일리_HJ 2022. 10. 4. 16:13Uncaught Error: Invariant failed: You should not use <Switch> outside a <Router>
https://hellowworlds.tistory.com/62
[React.JS] Error: Invariant failed: You should not use <Switch> outside a <Router> 해결 방법
Error: Invariant failed: You should not use outside a 오류 : 불변 실패 : <라우터> 외부에서 <스위치>를 사용해서는 안됩니다. 음.. 이 오류가 발생한 이유는 태그로 전체를 감싸주지 않았기 때문이다. 감싸..
hellowworlds.tistory.com
"react-router-dom": "^5.3.0",
6.x.x
버전부터는 switch를 사용하지 않음
'웹 개발 > React' 카테고리의 다른 글
[React] (useRef 활용) 함수를 특정 페이지에서만 동작하지 않게 하기 (0) | 2023.02.21 |
---|---|
[React] Router replace to (0) | 2022.12.08 |
[React] Route - Redirect (0) | 2022.10.04 |
[React] Router render / component (0) | 2022.10.04 |
[React] 엑셀 다운로드 xlsx (0) | 2022.09.27 |