Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split render and rendered into separate task queues #1360

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Jul 1, 2020

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:

  • I have run ./ci/run_stable_checks.sh
  • I have reviewed my own code
  • I have added tests

@jstarry jstarry merged commit bb6ca01 into yewstack:master Jul 1, 2020
@jstarry jstarry deleted the fix-regression branch July 1, 2020 13:01
@ctm
Copy link
Contributor

ctm commented Jul 1, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants