Import creatBrowserHistory with curly brackets. It’s exported as a named export.
// history.js
import { createBrowserHistory } from "history";
export default createBrowserHistory();
Then import and use it in index.
// index.js
import history from "./history";
import { Provider } from "react-redux";
import store from "./store/store";
const AppContainer = () => (
<Router history={history}>
<Provider store={store}>
<Route path="https://stackoverflow.com/" component={App} />
</Provider>
</Router>
);