Hey guys, I’m new to react and right now trying to implement Routing with react router dom.
But I get a problem with this Routing.
After writing the code and starting the react, the localhost:3000 show nothing, just a blank page, although the web pack compiled successfully (Terminal)
Here is my code:
import React from ‘react’; import ‘./App.css’; import Nav from ‘./Nav’; import EKGSim from ‘./EKGSim’; import { BrowserRouter as Router, Routes, Route} from ‘react-router-dom’; function App() { return( <Router> <div className=’App’> <Nav /> <Routes> <Route exact path=”/ekgsim” element={<EKGSim/>} /> </Routes> </div> </Router> ) } export default App;
Can anyone help me with this problem?
Thanks a lot.
submitted by /u/abitpainintheass
[link] [comments]