4 ms·
I see from the docs that if you don't want an SPA then you should use Docusaurus 1 instead of Docusaurus 2. What are the downsides of using an SPA? I guess yo
by justin_oaks 4y ago
I see from the docs that if you don't want an SPA then you should use Docusaurus 1 instead of Docusaurus 2.
What are the downsides of using an SPA?
I guess you couldn't have a JavaScript-free site, but I'm not sure of other downsides.
- slorber 4y agoThe downsides of a SPA is that using React client-side is more heavy than plan static html files with vanilla JS. It has a cost on the amount of JS to initially download, and executing that JS. We believe React enables a better UX, and this weight is worth it for multiple reasons (SPA navigation, prefetching, and upcoming things). You can compare for yourself and see what's best: docusaurus.io (SPA/React) vs v1.docusaurus.io (MPA/vanillaJS) Note we didn't upgrade to React 18 yet, which will reduce the cost of using React client side, and provide new interesting concurrent features like progressive hydratation. We also want to leverage React Server Components later. We could also explore using Preact. The web APIs are also constantly evolving, with new page transition APIs and things like that. It's not impossible we move back to a MPA in the (long term) future if it makes sense.