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

Bug: Layout effects don't re-fire in 18 on Suspense re-showing #21676

Closed
gaearon opened this issue Jun 14, 2021 · 1 comment · Fixed by #21694
Closed

Bug: Layout effects don't re-fire in 18 on Suspense re-showing #21676

gaearon opened this issue Jun 14, 2021 · 1 comment · Fixed by #21694

Comments

@gaearon
Copy link
Collaborator

gaearon commented Jun 14, 2021

Intended behavior: reactwg/react-18#31

Sandbox: https://codesandbox.io/s/react-18-layouteffect-semantics-forked-m02w5

Expected: when suspended content is hidden and then shown, we get layout cleanup followed by layout setup.
Actual: only layout cleanup happens.

@gaearon gaearon added Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Component: Concurrent Features Component: Suspense Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jun 14, 2021
@bvaughn bvaughn self-assigned this Jun 14, 2021
@bvaughn
Copy link
Contributor

bvaughn commented Jun 16, 2021

I think this is a subtreeFlags issue. In commit work, where we check the Offscreen tree fiber.subtreeFlags & LayoutMask, the test you added shows no layout flags so we skip the subtree.

We intentionally removed the subtreeFlags checks for most places, since the values aren't 100% reliable and the check is just an optimization, but it looks like @acdlite added this one in #21386.

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

Successfully merging a pull request may close this issue.

2 participants