c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
ReactJS

Attempted import error: 'Switch' is not exported from 'react-router-dom' - ReactJS

| | reactjs
In this tutorial I will show you how to fix the following error in - ReactJS "Attempted import error: 'Switch' is not exported from 'react-router-dom' " 

To fix this problem:
I just uninstalled the version of react-router-dom 6.4.2 from my react project.

npm uninstall react-router-dom
and then installed react-router-dom version 5.2.

npm install react-router-dom@5.2.0