codestates / codestates/sohoMovie

[Error Handling] ‘Switch’ is not exported from ‘react-router-dom’

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

> ### 어떤 에러인가요?
> ‘react-router-dom’ v6이상 부터는 Swich 사용 불가
> ### 에러 메시지
> ```shell
> Attempted import error: 'Switch' is not exported from 'react-router-dom'
> ```
>
> ### 에러 핸들링 방법
> React-Router-dom v6+를 사용하는 경우에는 There is Switch 가 Routes 로 대체 되므로 단순히 Routes 를 가져와서 사용할 수 있습니다.
>
> ```js
> import { Routes ,Route } from 'react-router-dom'; # Working in v6 And Above
> ```
>
> ### 에러 핸들링을 위해 참고한 레퍼런스 링크
> 링크 https://exerror.com/attempted-import-error-switch-is-not-exported-from-react-router-dom/

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no repository file or test. Check the project's react-router-dom version and the route entry point, then verify the documented import and replacement against the installed version; done means the error guidance is accurate and usable for React Router v6 or later.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, web-dev
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.