I’ve used react on some other scripts before, and this is the first time using react router with fivem, and I keep getting 404 not found when i render the page
Here is the code
const routes: RouteObject[] = [
{
path: "/",
element: <AppLayout />,
children: [
{
path: "/",
element: <Dashboard />,
},
{
path: "/settings",
element: <Settings />,
},
],
},
];
const router = createBrowserRouter(routes);
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<VisibilityProvider>
<RouterProvider router={router} />
</VisibilityProvider>
</React.StrictMode>,
);
when i Replace with a normal component for example it render just fine