Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering Strategies (prerender vs SSR vs CSR) #951

Closed
thescientist13 opened this issue Jun 29, 2022 · 1 comment
Closed

Rendering Strategies (prerender vs SSR vs CSR) #951

thescientist13 opened this issue Jun 29, 2022 · 1 comment
Assignees
Labels
documentation Greenwood specific docs RFC Proposal and changes to workflows, architecture, APIs, etc v0.30.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Jun 29, 2022

Summary

Coming out of #921 / #879, just wanted to track and make sure we are accurately accounting for the various cases of rendering and how / when to use them, and how we document them

Adding support for prerender in development would also be supper awesome here.

Details

At least break them down a bit clearer and when they happen, and what the JS output / delivery is

  • SSG - run at build time - CDN
  • SSR - run at request time - server, serverless
  • CSR - run at run time, like a SPA
  • prerender - CSR (or SSR) run JS once at build time, e.g. puppeteer (one time render)
    • however, also means "export" for SSR, so will need to disambiguate
    • export const prerender = true;
  • export -> prerender SSR at build time to produce SSG (e.g. getStaticProps)
  • csr = false instead of static optimization, but how in HTML? (custom <script setup> block?)
  • move prerender configuration to be an optimization setting?

It should also cover how client side JavaScript plays a role, hydration, eager / lazy loading, etc.

Also, for instance using the GraphQL plugin requires needing to set prerender configuration to true as well as only working with the puppeteer rendering plugin? Should validate if this can work with WCC SSR too.

Maybe worth looking into along with #545

Also, need to handle globalThis as per ProjectEvergreen/wcc#100, and possibly refactoring / documenting using globalThis instead of window, like in the router.

@thescientist13 thescientist13 added the RFC Proposal and changes to workflows, architecture, APIs, etc label Jun 29, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Jun 29, 2022
@thescientist13 thescientist13 mentioned this issue Jun 29, 2023
25 tasks
@thescientist13 thescientist13 mentioned this issue Mar 9, 2024
39 tasks
@thescientist13 thescientist13 self-assigned this Oct 12, 2024
@thescientist13 thescientist13 added documentation Greenwood specific docs and removed alpha.7 labels Oct 12, 2024
@thescientist13
Copy link
Member Author

Documenting as part of the new website - ProjectEvergreen/www.greenwoodjs.dev#117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Greenwood specific docs RFC Proposal and changes to workflows, architecture, APIs, etc v0.30.0
Projects
No open projects
Development

No branches or pull requests

1 participant