[ssr] Initial implementation of serverUntil & ServerController#1690
Draft
kevinpschaaf wants to merge 4 commits intomainfrom
Draft
[ssr] Initial implementation of serverUntil & ServerController#1690kevinpschaaf wants to merge 4 commits intomainfrom
kevinpschaaf wants to merge 4 commits intomainfrom
Conversation
Contributor
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
c5e10e4 to
386a079
Compare
3083530 to
04efd07
Compare
04efd07 to
52197d3
Compare
52197d3 to
9eeb032
Compare
|
1 task
PonomareVlad
added a commit
to PonomareVlad/lit
that referenced
this pull request
Aug 10, 2023
This was referenced Nov 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for opt-in asynchronous rendering (rendering a partial template and pausing until an async condition is fulfilled, and then continuing).
Implemented by adding support for special conditions during SSR rendering to return a Promise containing a continuation iterable back up to the stream, and a special
readableFrom(iterable: Iterable<string>, handleAsync = false)helper that creates aReadablethat handles the continuation. This allows us to keep the main rendering via a synchronous iterable (so that when not using async rendering we can preserve the ability to synchronously render lit templates), with opt-in support for async chunking.Experimental helpers to pause rendering:
serverUntil- a version of theuntildirective that will pause rendering until the awaited promise resolvesServerController- a ReactiveController interface that adds aserverUpdateCompletefield/getter; when implemented and returns a promise, rendering will be paused until the/all controllers have resolvedIf the helpers aren't used,
Readable.from(render(...))will continue to work. If code being rendered does use one of the helpers, the readable should be created withreadableFrom(render(...), true), otherwiseReadable.fromwill throw.