React Router Help

Hi, So I am creating a dummy store using react, without BrowserRouter I can render all the pages, but once I implement the router, nothing happens.

Below is what I have on my page as for the code, any idea where I may be missing something or why it wont render?

import React, { Component } from "react";
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import './App.css';

import 'bootstrap/dist/css/bootstrap.min.css';

import Header from './Components/Header';
import Home from './Components/Home';
import Products from './Components/Products';
import Footer from './Components/Footer';

class App extends Component {
  render() {
    return (
      <div className="App">
        <Router>
          <div>
            <Header />
            <Switch>
              <Route exact={true} path="/home" Component={Home} name="Mentor" loggedIn={loggedIn} />
              <Route path="/store" Component={Products} products={products} />
            </Switch>
            <Footer />
          </div>
        </Router >
        {/* <Products products={products} /> */}
      </div >
    );
  }
}


export default App;

It’s component with small c

1 Like