Single-page websites, such as vue, recat frames, are usually sent directly from the server to index. HTML, where the full HTML page is rendered via js via the client browser according to its own route。
But the reptiles in the search engine are not as smart (actually google is smart enough to get a js file to help you out, but in cn it's gonna be a hundred degrees down.) for seo, if you want the reptiles to climb to your website, you have to get the pages out of the server and send them to the reptile, which is embarrassing. The traditional server is multipage, one request corresponds to one page, but the spa isn't, is it, is it, is a single page, you ask me to write all kinds of routing? Of course not. Here are a few options

React your own rendertostring
React the rendertostring and rendertostaticmarkup that can be used to export components into HTML strings, which look good, but with parameters, webpack won't do, what webpack will do, what webpack will write together, what redux will do, and if you're all ok, react's own scheme is a good option, so let's not mention it here。
Nextjs

Another option, which is even more embarrassing, is that a framework called the nexttjs (nexttjs are react, vue's nuxtjs) that is written directly as a multipage, i. E. A web site with react's syntax and rules, each page's entry name is a route name, and the server is a nextjs' own, and it looks great to get a single page out in a few lines

Then why are you embarrassed? It's because he says it's like react, but it's a new framework, and you have to take time to learn about textjs; his route corresponds to a page file that seems simple and clear, but is not free at all; he's multipage, so it's hard to evolve to a single page, and you let me go back to the middle ages? The original sin! So if you've already written a single page site, and you're going to change it to the nextjs framework, i can only say "hoh!"




