I attempted to display my main page using routes but I am still encountering the same ReferenceError.
Below is my code snippet:
import React from "react";
import ReactDOM from "react-dom/client";
import App from "../components/app";
import reportWebVitals from "./reportWebVitals";
import {
createBrowserRouter,
RouterProvider,
} from "react-router-dom";
import Product from "./products/product";
const router = createBrowserRouter([
{
path: "/",
element: <App />,
},
]);
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);
reportWebVitals();