📌  相关文章
📜  'Switch' 不是从'react-router-dom' 导出的 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:51.605000             🧑  作者: Mango

代码示例1
Here Just Install Switch.
...And then you can use Switch. 
...Switch is replaced in react-router-dom version 6. 
...So that you need to install react-router-dom version 5. 
...Now, your error should be solved.

Run the command below in your terminal

   npm install react-router-dom@5