Split render and rendered into separate task queues #1360
Merged
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.
Description
If a component has a sub-component, the sub-component should always be rendered before the parent component. Yew v0.17.0 broke the behavior and instead calls
rendered()
on the parent component before rendering the sub-component.To fix this, the render task has been split into "render" and "rendered" so that components can be rendered eagerly but Yew will not call the
rendered()
lifecycle method for a component until all of its sub-components have been fully rendered.This change also ensures that the rendering phase doesn't get interrupted as easily, which should improve performance for some apps.
Fixes #1326
Fixes: #1358
Checklist:
./ci/run_stable_checks.sh