-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
If you nest two Solid islands into each other, the nested one is mounted twice #6263
Comments
@idiglove you're looking at the dev server logs, please check the browser logs |
Problem might be with a fallback to
Question though as there is no I might dig a bit 🤔 |
@alexander-lozovsky did you test that in a production mode? |
@SerekKiri yes, it happens in both SSR and SSG builds |
@alexander-lozovsky could you check if your project will work properly with changes added by @matthewp in the PR mentioned above? |
I haven't tested yet, but #7370 might also help with this. |
I ran the repro and updated Astro to latest and it seems to be fixed now. |
What version of
astro
are you using?2.0.12
Are you using an SSR adapter? If so, which one?
No
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
When you render two Solid islands nested into each other, the nested one is mounted twice.
So in case you have something like this:
NestedComponent
runs twice in the browser, which means that if you run some logic insideonMount
, it runs twice.See the attached stackblitz: click "Open in New Tab" and observe "NestedComponent" logged twice in the console
Same composition with React components works as expected https://stackblitz.com/edit/github-tgt7ck?file=src/pages/index.astro
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-gcp42c?file=package.json
Participation
The text was updated successfully, but these errors were encountered: