Since you need the sitemap, I guess SEO matters to you. So, in this case, I think the SPA is not a good solution. If you don't want to the server side, you can try the SSG(static site generation) solution such as Next.js, Gatsby, and Remix. Since you are using the react-router-dom, Remix may be easier for you. Most of the React SSG solutions can automatically generate a sitemap during the build process.