Skip to main content

Setup Pages

To better organize lessons, we'll setup different pages using React Router DOM

GPT Guide

use createBrowserRouter to generate the following paths

  • root: App component
  • childrens
    • profile: Profile component

then pass result to RouterProvider from react-router-dom

Ref: https://reactrouter.com/en/main/routers/create-browser-router

TODOs

  • Setup router in main.tsx
  • Add simple page: Profile
  • Add simple nav in App