Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

switch is not exported from react-router-dom

uninstal react-router-dom
npm uninstall react-router-dom
//and install old version it will resolve the error
npm install react-router-dom@5.2.0
Comment

switch is not exported from react-router-dom

import React from "react";
    import "./App.css";
    import NavBar from "./components/navbar.js";
    import Footer from "./components/footer.js";
    import Home from "./components/pages/homepage/home.js";
    import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
    
    function App() {
      return (
        <Router>
          <div className="app-container">
            <NavBar />
            <Switch>
              <Route path="/home" component={Home} />
            </Switch>
            <Footer />
          </div>
        </Router>
      );
    }
    
    export default App;
Comment

PREVIOUS NEXT
Code Example
Javascript :: angular rxjs-compat is uptodate 
Javascript :: how to ask for leave in js 
Javascript :: jest test coverage 
Javascript :: <xsl:apply-templates select node text subnodes all 
Javascript :: wrap three three set div in a single div 
Javascript :: Message on a kendo loader 
Javascript :: You may need an appropriate loader to handle this file type when importing images 
Javascript :: dropzone alert 
Javascript :: button color change loop in react 
Javascript :: how to load a javascript game from react 
Javascript :: javascript look array 
Javascript :: Content-script overlay for extension 
Javascript :: nodejs app.on connection 
Javascript :: too many rerenders 
Javascript :: how to install react-router-dom in react js 
Javascript :: react movies 
Javascript :: Half or Left Triangle Pattern in JavaScript 
Javascript :: javascript escape comma in csv 
Javascript :: focus on image when click 
Javascript :: mongoose search by keywords 
Javascript :: common library for .net and node js for encryption 
Javascript :: saving some fields of an instance in sequelize 
Javascript :: remove console messages of react-i18next 
Javascript :: Adding Handlers to All Forms 
Javascript :: how to input struct into parameter in remix 
Javascript :: create array, fill with spaces, convert to string and concat 
Javascript :: sequelize autocomplete vscode 
Javascript :: how to press a button throught the dev tools console 
Javascript :: parentsuntil without jquery 
Javascript :: html how to remove class with js 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =