question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Concurrent async SSR

See original GitHub issue

Hi all, fantastic work on twind!

I was looking into integrating this into an experiment of mine that brings full async SSR but noticed that twind’s SSR docs appear to assume that only one concurrent render operation can be in effect at once. Are there any tricks I’m missing that would allow me to potentially:

  1. Start rendering page A
  2. Start rendering page B
  3. Start rendering page C
  4. Finish rendering page A and generate static stylesheet
  5. Finish rendering page C and generate static stylesheet
  6. Finish rendering page B and generate static stylesheet

The potential for interleaving and out-of-order completion has me a bit worried.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ggoodmancommented, Jan 9, 2021

@sastan thanks for circling back. I retried using sheet.reset() immediately before walking the html and that seems to have worked! 🎉

0reactions
sastancommented, Jan 9, 2021

@ggoodman Could we help to resolve your issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Overview of Server Side and Isomorphic Async Rendering
Server Side Rendering (SSR) and SOA provide faster loading, smoother user experiences, and uses less resources; SSR is hard, using async code ...
Read more >
Resolving async state while server-rendering · Pullstate
Universal fetching. Any action that is making use of useBeckon() (discussed in detail here) in the current render tree can have its state...
Read more >
Strategies for server-side rendering of asynchronously ...
js is supposed to be server-side rendering. The problem is that the key function React.renderComponentToString() is synchronous which makes it ...
Read more >
Asynchronous Server side rendering with React - Medium
React and React-Router come with out-of-the-box server side rendering. Unfortunately — they do not support asynchronous rendering.
Read more >
дэн on Twitter: "When people hear “async rendering” their gut ...
Perhaps “concurrent rendering” is more accurate? ... very similar to React async rendering (ssr, async, & stream the rendered html as multiple chunks)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found