i appear to be having trouble with the connecting of the history from react router but the error is unclear
TypeError: locationProp is undefined
272 | locationProp = parsePath(locationProp);
273 | }
274 |
> 275 | let {
| ^ 276 | pathname = "/",
277 | search = "",
278 | hash = "",
App.js looks like this
import React from "react";
import { Router, Routes, Route } from "react-router-dom";
import StreamList from "./streams/StreamList";
import StreamCreate from "./streams/StreamCreate";
import StreamEdit from "./streams/StreamEdit";
import StreamDelete from "./streams/StreamDelete";
import StreamShow from "./streams/StreamShow";
import Header from "./Header";
import history from "../history";
const App = () => {
return (
<div className="ui container">
<Router history={history}>
<Header />
<Routes>
<Route path="/" element={<StreamList />} />
<Route path="/streams/new" element={<StreamCreate />} />
<Route path="/streams/edit" element={<StreamEdit />} />
<Route path="/streams/delete" element={<StreamDelete />} />
<Route path="/streams/show" element={<StreamShow />} />
</Routes>
</Router>
</div>
);
};
export default App;
this is from part 24 video 21 - creating a Browser History Object in the Udemy React and Redux course
history.js looks like this
import { createBrowserHistory } from "history";
export default createBrowserHistory();