#React #文章 本文探讨了单页应用(SPA)的定义、实现方式及其存在的问题。SPA旨在通过不刷新页面来保留JavaScript状态,实现快速加载。然而,随着页面和UI的增加,SPA的bundle大小会增大,导致加载时间变长。代码分割和懒加载虽能缓解这一问题,但会引入新的数据获取延迟。文章还讨论了框架如Next.js和React Router Framework如何通过服务器端渲染(SSR)和客户端导航来解决这些问题,提供了一种SPA和多页应用(MPA)的混合解决方案。
https://reacttraining.com/blog/understanding-spas-and-their-shortcomings
https://reacttraining.com/blog/understanding-spas-and-their-shortcomings