Description
Describe the bug
If you store a component in a variable it runs onMount once the element is created, but not necessarily when it's mounted to the actual DOM. If this isn't fixable, might want to update the docs.
Similarly for onCleanup, once you're in this state the cleanup is based on the ancestors.
Your Example Website or App
https://playground.solidjs.com/anonymous/dbcc36b4-44e6-49ed-a7bf-50e376d71016
Steps to Reproduce the Bug or Issue
https://playground.solidjs.com/anonymous/dbcc36b4-44e6-49ed-a7bf-50e376d71016
https://playground.solidjs.com/anonymous/efd63022-a8c2-44fb-842f-51c474b4b959
Expected behavior
As a user, I'd expect onMount and onCleanup to run when the relevant component and elements are inserted into and removed from the DOM itself.
Registers a method that runs after initial rendering is done and the elements are mounted to the page.
https://docs.solidjs.com/reference/lifecycle/on-mount (emphasis mine)
Screenshots or Videos
No response
Platform
All of them I'd assume
Additional context
No response