Skip to content
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

Parcel never mounts component with StrictMode enabled #160

Open
eljo opened this issue Jan 13, 2023 · 3 comments · May be fixed by #206
Open

Parcel never mounts component with StrictMode enabled #160

eljo opened this issue Jan 13, 2023 · 3 comments · May be fixed by #206

Comments

@eljo
Copy link

eljo commented Jan 13, 2023

With React 18 development library and <React.StrictMode> the 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.
@eljo eljo changed the title Parcel never mounts component with StrictMode Parcel never mounts component with StrictMode enabled Jan 13, 2023
@MilanKovacic
Copy link
Collaborator

Hi, did you solve the problem?

@webJose
Copy link

webJose commented Nov 11, 2023

I just stumbled upon this same scenario.

@BournazosHarry
Copy link

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.

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

Successfully merging a pull request may close this issue.

4 participants