-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
react-call-return
: Expected to find a host parent.
#11955
Comments
Performing the same sequence of mounts and unmounts with |
Wanna try digging into where the bug is? |
Tagging as a good issue to get into, but it's not an easy one. |
Yes, I'd love to dig into it further! |
Sounds good. You'll probably want to look at BeginWork, CompleteWork, and ChildFiber, and how those handle Calls and Returns. Let me know if some aspects are confusing and I can try to explain. |
It seems like a minor mistake when reconciling the children, causing duplicate deletions in some cases. Opened a pull request for the changes. |
Fixed in #11979. There are likely more bugs with call/return. If you can try to stress-test this feature and find them, that would be great! |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
A specific order of unmounting and remounting
unstable_createReturn
s fromreact-call-return
causes an invariant violation inunmountHostComponents
.Reproduce
The following sandbox example crashes with an invariant violation when both the
min
andcycle
props are odd numbers greater than zero.https://codesandbox.io/s/llyjz19rz7
What is the expected behavior?
The app does not crash and cycles the number of items in the list.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
react
andreact-dom
versions 16.1 and newer,react-call-return
version 0.5.0The text was updated successfully, but these errors were encountered: