I'm wrapping react app in Router with passing createBrowserHistory prop. But getting "property 'history' does not exist on type 'IntrinsicAttributes & RouterPops"
Here is my index.tsx
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import { Router } from "react-router-dom";
import history from "../src/utils/history";
ReactDOM.render(
<Router history={history}>
<App />
</Router>,
document.getElementById("root")
);
Here is my history.tsx
import { createBrowserHistory } from "history";
const history = createBrowserHistory();
export default history;
I'm using react-router-dom v6.0.2