resistants/src/main.tsx

20 lines
477 B
TypeScript
Raw Normal View History

2023-02-23 22:03:06 +00:00
import React from "react";
import ReactDOM from "react-dom/client";
2023-02-25 21:02:50 +00:00
import { createBrowserHistory } from "history";
2023-02-23 22:03:06 +00:00
import { App } from "./App";
2023-01-29 20:27:02 +00:00
2023-02-25 21:02:50 +00:00
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();