import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserHistory } from "history";
import { App } from "./App";

const renderResistants = () =>
  ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
    <React.StrictMode>
      <App />
    </React.StrictMode>
  );

const browserHistory = createBrowserHistory();
browserHistory.listen(() => {
  console.log("re-rendering");
  renderResistants();
});

renderResistants();
