single-spa-react
single-spa-react copied to clipboard
Parcel never mounts component with StrictMode enabled
With React 18 development library and <React.StrictMode> the <Parcel> component does not mount the actual parcel.
Observed flow:
- componentDidMount is called which calls addThingToDo
- componentWillUnmount is called which calls addThingToDo and immediately sets this.unmounted = true
- First addThingToDo is invoked and immediately returns as this.unmounted is true.
Hi, did you solve the problem?
I just stumbled upon this same scenario.
We experience the same issue. We use the Parcel component and what I noticed is that it mounts it, it's visible for a split of a second and then it unmounts it. Could it be that in the second render of StrictMode the parcel is considered mounted? Some timing issue maybe? I hope you can figure it out soon.