forward Routing

This project uses react-router v6 as its base routing system. You can find all project's routes configuration in the src/App.js file. If you want to define a new route to the project, you can follow the steps below:

  1. Import your react component into src/App.js file.
  2. const newComponent = lazy(() => import("../pages/NewPage"));
    Note: Lazy loading is a great way to improve the performance of your React application. By loading components on-demand, you can avoid wasting time and resources on components that the user may never even see.
  3. Use the Route component to define your new route.
  4. <Route ...props> </Route>
  5. Specify the path and component props for the Route component.
  6. <Route exact path="/new-url" > </Route>
  7. Add the new Route component to the project's root Routes component.
  8. <Routes> <Route exact path="/new-url" element={ <newComponent />} > </Route> </Routes>