I just learned from react to write a spa single-page application. I know a little about "nodejs+koa2+ template" to build a simple website, but it is confusing to combine react+koa2:
1, can a single spa page be used simultaneously with backend template rendering on a website? Spa single page jumps to a web page rendered by the backend template through the a tag? And then how do you jump back to spa?
2, how does the back end tell when to return a page and when to return json? Is it usually distinguished by routing or something else?
3, should the route verification of unlogged-in redirection be done in spa or on the server?
Thank you first!