Skip to content

Commit

Permalink
[Flight] Allow aborting during render
Browse files Browse the repository at this point in the history
Previously if you aborted during a render the currently rendering task would itself be aborted which will cause the entire model to be replaced by the aborted error rather than just the slot currently being rendered.

This change updates the abort logic to mark currently rendering tasks as aborted but allowing the current render to emit a partially serialized model with an error reference in place of the current model.

The intent is to support aborting from rendering synchronously, in microtasks (after an await or in a .then) and in lazy initializers. We don't specifically support aborting from things like proxies that might be triggered during serialization of props
  • Loading branch information
gnoff committed Jun 6, 2024
1 parent c865358 commit b98f9e4
Show file tree
Hide file tree
Showing 3 changed files with 662 additions and 29 deletions.
Loading

0 comments on commit b98f9e4

Please sign in to comment.