3 ms·
Apparently scheduling/skipping renders is hard with this approach, since render function gets compiled away and becomes hardcoded DOM calls in the result bundle
by noway421 6y ago
Apparently scheduling/skipping renders is hard with this approach, since render function gets compiled away and becomes hardcoded DOM calls in the result bundle. React with Suspense takes a different approach here and allows to suspend renders, skip slow renders (I think) till they're ready, prioritise keyboard input, etc.
It's essentially a similar tradeoff as in AOT vs JIT. Even though AOT brings the compilation step forward, JIT would have much more runtime context for better performance.
- pier25 6y agoYeah, but in truth you might never need Suspense when using Svelte. Reacts needs Suspense because it's quite slow and bloated in comparison. See this video Rich Harris made when comparing a visualization use case: https://twitter.com/Rich_Harris/status/1200807516529147904 https://twitter.com/Rich_Harris/status/1200807516529147904