Invariant Violation: You should not use outside a

后端 未结 10 1407
没有蜡笔的小新
没有蜡笔的小新 2021-02-01 00:30

I have a problem that I don\'t know how to solve, I get this error when running npm test

Invariant Violation: You should not use

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 01:06

    i found a solution to resolve this issue

    here is the Example code

    import React from 'react';
    import Home from './HomeComponent/Home';
    import { Switch, Route } from 'react-router';
    import { BrowserRouter } from "react-router-dom";
    class App extends React.Component{
    render(){
    return(
             
               
                 (
                    
                )}/>
              
            
        )
      }
    }
    export default App;
    

提交回复
热议问题