I'm using React Router as a...
framework
Reproduction
import { type RouteConfig, index, route } from "@react-router/dev/routes";
export default [
index("routes/home.tsx"),
route("onboarding", "routes/onboarding.tsx"),
route("dashboard", "routes/dashboard.tsx"),
] satisfies RouteConfig;
import type { Route } from "./+types/dashboard";
import { SidebarProvider } from "~/components/ui/sidebar";
import { DashboardSidebar } from "~/components/dashboard/sidebar";
export function meta({}: Route.MetaArgs) {
return [
{ title: "Dashboard | Profi" },
{ name: "description", content: "Some description" },
];
}
export default function Dashboard() {
return (
<SidebarProvider>
<main className="w-full">
<div className="w-full h-full bg-blue-900" />
</main>
<DashboardSidebar />
</SidebarProvider>
);
}
When I save file, UI shows, but when I browser refresh, it shows the above error
System Info
Used Package Manager
npm
Expected Behavior
Refresh should also show the UI correctly
Actual Behavior
Error screen is shown