-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix multi-parcel unmount resolving #161
Conversation
The core library, single-spa, handles unmounting multiple parcels at once without an issue, I think there is a larger problem with the structure for single-spa react and while this change works it also changes the API in a way that I'm initially uncomfortable with because it changes it only for react and increases the mental surface area for maintenance. |
Does it change the API? Seemed like [Edit] unless |
Ultimate issue:
Current path, single parcel:
Current path, parcels > 1:
We need |
The part of the API that appears to be changing is I could be missing where it's already required though, if it's already required please let me know. |
Ah, it does seem name has a default, we don't set that either. All of ours end up as Looks like the fallback happens here inside of the core library, and the parcel name gets set here. Adjusting the fallback on that line locally does change all of the parcel names for me - e.g. I triggered the errors from the first gif and now the names all say FWIW the file uses For fun, I commented out |
Good clarification. Will review again with that insight. Thank you |
The root object currently only allows a single
unmountFinished
promise at a time. Multiple parcels unmounting at the same time leads to most promises orphaned and not resolving, throwing console warnings.This PR uses the parcel name to differentiate unmount promises.
Before:

After:
