Reputation: 1001
I dont know why i am getting this error, i have tried searching online and i saw some suggestions which i tried out but the error wouldn't clear. Please does anyone have any idea on what am doing wrong. Here is my code:
import React from 'react';
import { BrowseRouter as Router, Route } from 'react-router-dom';
import Join from './components/Join';
import Chat from './components/Chat';
const App = () => (
<Router>
<Route path="/" exact component={Join} />
<Route path="/chat" exact component={Chat} />
</Router>
);
export default App;
Upvotes: 4
Views: 11579
Reputation: 31
there is a misspelled on BrowserRouter** you have it as BrowseRouter. it should be BrowserRouter not BrowseRouter. try this
import { BrowserRouter as Router } from "react-router-dom";
Upvotes: 3
Reputation: 80128
react-router-dom
doesn’t export BrowseRouter
, it exports BrowserRouter
.
Upvotes: 10