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

Don’t use yielded elements in async generator components when props are stale #214

Open
brainkim opened this issue Sep 21, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@brainkim
Copy link
Member

brainkim commented Sep 21, 2021

Just tracking an idea I had last night. It’s possible in async generator components for stale props to be rendered, esp if the async generator component is awaiting something in the loop body. It would be nice if we could throw away all these renders until the next time props is read, to ensure we don’t render out of date children.

Should this work for updates + refreshes, or just updates?

@brainkim brainkim self-assigned this Oct 4, 2022
@brainkim brainkim added the enhancement New feature or request label Oct 4, 2022
@brainkim brainkim added this to the 0.5.0 milestone Oct 5, 2022
@brainkim
Copy link
Member Author

This issue is closely related to #239.

brainkim pushed a commit that referenced this issue Oct 31, 2022
Tanking on a refactoring of async generator components, and making the
enqueuing behavior work based on the render loop.

1. Stop letting block promises reject.
2. Explicitly disallow fancy iterators which can be both sync/async.
3. Move the async generator components yielding logic OUTSIDE the
   run()/step()/advance() loop.
4. Enqueue updates to async generator components based on the render loop. The
   behavior of components will differ based on whether or not we are in the
   render loop.
brainkim pushed a commit that referenced this issue Feb 1, 2023
Tanking on a refactoring of async generator components, and making the
enqueuing behavior work based on the render loop.

1. Stop letting block promises reject.
2. Explicitly disallow fancy iterators which can be both sync/async.
3. Move the async generator components yielding logic OUTSIDE the
   run()/step()/advance() loop.
4. Enqueue updates to async generator components based on the render loop. The
   behavior of components will differ based on whether or not we are in the
   render loop.
@brainkim brainkim modified the milestones: 0.5, 0.6 Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant