问题
what is SPA( single page application ) ?
i'm use to react by 'create-react-app' that is SPA ?
回答1:
The simplest answer is an SPA or Single Page Application is a web app that loads a single HTML page and all the necessary assets (such as JavaScript and CSS) required for the application to run. It then uses dynamic techniques (AJAX) to update just parts of that page, instead of making a round trip to the server to create new pages.
A benefit is that you only transfer the minimum amount of data needed to make the update changes after the main page has been loaded. The main page loads all the content (js, css, etc) that the SPA needs to run so the initial page load can take longer, but after that it is very fast.
Popular ways to handle the dynamic content aspect is with frameworks or libraries like Angular or React that handle a lot of the frontend heavy lifting.
Yes, 'create-react-app' is a tool for creating a React SPA.
回答2:
Not sure if I'm understanding your question correctly but...
A single page application is a way of using React that uses various 'views' instead of different pages. This is advantageous because it prevents using page redirects and page reloads which makes page navigation simple and efficient.
'create-react-app' can be used to create a SPA or a non-SPA depending on how your organize your code.
来源:https://stackoverflow.com/questions/51506533/what-is-single-page-application