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

Refine isFiberSuspenseAndTimedOut #18184

Merged
merged 2 commits into from
Mar 2, 2020
Merged

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 28, 2020

This changes the isFiberSuspenseAndTimedOut implementation based on Sebastian's feedback below:

I think you might need to check for fiber.memoizedState.dehydrated === null here. If dehydrated is non-null it's a not-yet hydrated boundary. I believe child will be null in that case.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 28, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 28, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 38cf7f6:

Sandbox Source
infallible-hopper-x2yxd Configuration

@sizebot
Copy link

sizebot commented Feb 28, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 38cf7f6

@sizebot
Copy link

sizebot commented Feb 28, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 38cf7f6

@sebmarkbage
Copy link
Collaborator

This might not throw but this still seems like it'll yield the wrong results. The assumptions are still wrong about isFiberSuspenseAndTimedOut

@trueadm
Copy link
Contributor Author

trueadm commented Feb 29, 2020

@sebmarkbage What are the correct assumptions? I can adjust accordingly.

@trueadm trueadm changed the title Refine getSuspenseFallbackChild Refine isFiberSuspenseAndTimedOut Feb 29, 2020
Add test case

revise test title
@trueadm trueadm merged commit 8cb2fb2 into facebook:master Mar 2, 2020
@trueadm trueadm deleted the scope-refinement branch March 2, 2020 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants