Skip to content

Nested parcels gets unmounted multiple times and throws #164

Open

Description

@tretne

Hi!

I'm having a scenario where parcel A is mounted as <Parcel config={() => System.import('@parcelA')} /> in the main app and that parcel in turn mounts parcel B as <Parcel config={() => System.import('@parcelB')} />.

When parcel A then gets unmounted, parcel B will be unmounted twice. Once by componentWillUnmount in the Parcel component of parcel A here and once as the child of parcel A here.

One of these times parcel B already has the status "UNMOUNTING" here and will cause the error https://single-spa.js.org/error/?code=6&arg=&arg=UNMOUNTING to be thrown. Parcel A also will end up with status "SKIP_BECAUSE_BROKEN" and still be kept as a child parcel by the main app.

Using:

  • single-spa v5.9.4
  • single-spa-react v5.0.0

Activity

  1. boringContributor commented on Feb 24, 2023

    @boringContributor

    How do you use the Parcel component in react v5 ? This seems not even to work anymore

  2. MilanKovacic commented on Jan 5, 2024

    @MilanKovacic
    Contributor

    How do you use the Parcel component in react v5 ? This seems not even to work anymore

    There was an error in one of the published versions. It should be fixed now.

  3. sandeeppatel344 commented on Nov 21, 2024

    @sandeeppatel344

    Hi!

    I'm having a scenario where parcel A is mounted as <Parcel config={() => System.import('@parcelA')} /> in the main app and that parcel in turn mounts parcel B as <Parcel config={() => System.import('@parcelB')} />.

    When parcel A then gets unmounted, parcel B will be unmounted twice. Once by componentWillUnmount in the Parcel component of parcel A here and once as the child of parcel A here.

    One of these times parcel B already has the status "UNMOUNTING" here and will cause the error https://single-spa.js.org/error/?code=6&arg=&arg=UNMOUNTING to be thrown. Parcel A also will end up with status "SKIP_BECAUSE_BROKEN" and still be kept as a child parcel by the main app.

    Using:

    • single-spa v5.9.4
    • single-spa-react v5.0.0

    I am also facing same issue.
    How we can solve?

  4. levrik commented on Jul 18, 2025

    @levrik

    Any workaround available for this? I'm also facing this issue although I'm simply using Parcel within a top-level Single-SPA app that unmounts together with the Parcel.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions