I am developing a single-spa react application. I am using navigateToUrl function from single-spa to switch from app A to app B. But after switching to app B, app A is still mounted in my DOM. How do I forcefully unmount that?
Asked
Active
Viewed 1,074 times
1 Answers
0
mountParcel (sometimes required, sometimes not): The mountParcel function provided by single-spa. In general, it is preferred to use an application's mountParcel function instead of the single-spa's root mountParcel function, so that single-spa can keep track of the parent-child relationship and automatically unmount the application's parcels when the application unmounts. Note that if the component is being rendered by a single-spa application that uses single-spa-react, it is unnecessary to pass in the prop, since can get the prop from SingleSpaContext
From: https://single-spa.js.org/docs/ecosystem-react/ <- section parcel props.
If you want to have better explanations you have to show your implementation

programmer
- 550
- 2
- 4
- 25