Summary
When JSX is compiled by a pre-rc.9 compiler but runs on the rc.9+ runtime
(or vice versa), delegated events silently never fire. The app renders
normally with no errors or warnings, which makes the mismatch very hard to
diagnose.
Environment
- solid-js / @solidjs/web: 2.0.0-rc.10
- vite: 8.3.1
- OS: Windows 11
How I hit it
The project depended on the deprecated vite-plugin-solid@3.0.0-next.27
shim. Its dependency on @solidjs/vite-plugin (^3.0.0-next.27) was
satisfied by an older plugin version already in node_modules, which npm
kept since it still matched the range. That plugin compiles with a
pre-rc.9 compiler.
Result
- the app renders normally, no errors or warnings
<button onClick={() => alert('hej')}> never fires
- in DevTools, the element has
$$click set but not _$$click
This is the rc.9 change moving delegated handlers from $$<type> to
_$$<type>. Both sides behave correctly on their own; the pairing is
just silently broken.
Suggestion
In dev builds, one of:
- have the document delegate warn once when it finds a
$$<type>
handler but no _$$<type> on the path (and the reverse in a 1.x-style
check if feasible)
- embed a compiler version marker in compiled output and have the dev
runtime warn on mismatch
Either would turn a silent failure into an actionable message. Since the
rc.9 notes mention 1.x widgets on the same page also using $$<type>, a
warning limited to dev mode, or suppressible, would avoid false positives
there.
Summary
When JSX is compiled by a pre-rc.9 compiler but runs on the rc.9+ runtime
(or vice versa), delegated events silently never fire. The app renders
normally with no errors or warnings, which makes the mismatch very hard to
diagnose.
Environment
How I hit it
The project depended on the deprecated
vite-plugin-solid@3.0.0-next.27shim. Its dependency on @solidjs/vite-plugin (^3.0.0-next.27) was
satisfied by an older plugin version already in node_modules, which npm
kept since it still matched the range. That plugin compiles with a
pre-rc.9 compiler.
Result
<button onClick={() => alert('hej')}>never fires$$clickset but not_$$clickThis is the rc.9 change moving delegated handlers from
$$<type>to_$$<type>. Both sides behave correctly on their own; the pairing isjust silently broken.
Suggestion
In dev builds, one of:
$$<type>handler but no
_$$<type>on the path (and the reverse in a 1.x-stylecheck if feasible)
runtime warn on mismatch
Either would turn a silent failure into an actionable message. Since the
rc.9 notes mention 1.x widgets on the same page also using
$$<type>, awarning limited to dev mode, or suppressible, would avoid false positives
there.