What happens
A page puts its game canvas inside a component's slot:
<SiteShell>
<canvas ref="demoMap" ...></canvas>
</SiteShell>and mounts it from onMount:
const demoCanvas = useRef<HTMLCanvasElement>('demoMap')
onMount(() => { if (!demoCanvas.current) return; start(demoCanvas.current) })demoCanvas.current is still null when onMount runs, so the guard returns and nothing starts, with no warning. Deferring one tick makes it work: onMount(() => { void nextTick(() => start()) }). The same pattern with a canvas that is not inside a component slot (a plain page) mounts fine.
Expected
onMount runs after the page's refs, including those in slotted component content, are attached, or the docs say to use nextTick for them. A silent null is the worst of both.
Observed in stx 0.2.756 building the home page of https://github.com/stacksjs/the-settlers-iii-remake (resources/views/index.stx, the startDemo guard).