Skip to content

Commit

Permalink
fix: do not re-create router on each app re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jun 17, 2024
1 parent a7ddb6d commit 29e1845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { usePosthog } from "./hooks/usePosthog";
import { Toaster } from "src/components/ui/toaster";
import routes from "src/routes.tsx";

const router = createHashRouter(routes);

function App() {
usePosthog();

const router = createHashRouter(routes);

return (
<>
<ThemeProvider defaultTheme="system" storageKey="vite-ui-theme">
Expand Down

0 comments on commit 29e1845

Please sign in to comment.