How to do CSUI routing?

I'm trying to build a chrome extension with plasmo, I' using the cs ui for my extension, now my extension will have multiple pages like initially there will be welcome page then clicking on a button will lead to a diffrent page like that. but I don't know how to do this kind of routing efficiently in CSUI currently i'm using the below approch, which will get out of hand if I add more and more pages, and it is very dificult for complex routing as well. Can someone please help me with any suggesition or something?

const App=()=>{
   const [page,setPage]=useState(1);
   return (
     <>
        {
           page===1?<Page1 setPage={setPage}/> :
           page===2?<Page2 setPage={setPage}/> : <NotFound/>
       }
    </>
  )

}


I have created a github discussion as well https://github.com/PlasmoHQ/plasmo/discussions/1025#discussion-6940304
GitHub
I'm trying to build a chrome extension with plasmo, I' using the cs ui for my extension, now my extension will have multiple pages like initially there will be welcome page then clicking on...
CSUI routing · PlasmoHQ plasmo · Discussion #1025
Was this page helpful?