I am trying to set up routing to navigate to different pages within my web app. The home page renders just fine. It is only when I try to navigate to a different page. When I navigate to a different page, it returns the below following:
App.js
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import React from 'react'
import { Component } from 'react';
import ReactDOM from "react-dom"
import Nav from '../navigation/Nav'
import '../css/App.css'
import About from '../components/About'
import Shop from '../components/Shop'
function App(){
return (
<Router>
<div className="App">
<Nav />
<Route path="/about" component={About} />
</div>
</Router>
)
}
export default App
About.js
import React from 'react'
function About(){
return (
<div className="About">
<h1>This is the About page</h1>
</div>
)
}
export default About
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>My React App</title>
</head>
<body>
<div id="app"></div>
</body>
</html>
Index.js
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
index.html
ReactDOM.render( < App /> , document.getElementById('app'));
**Edit: **
versions:
"dependencies": {
"react": "^16.11.0",
"react-dom": "^16.11.0",
"react-router-dom": "^5.1.2"
}

react-routerare you using?