Skip to content

docs: runnable Svelte + Solid examples, try-online links - #17

Merged
jlc488 merged 1 commit into
mainfrom
feature/svelte-solid-examples
Aug 8, 2026
Merged

docs: runnable Svelte + Solid examples, try-online links#17
jlc488 merged 1 commit into
mainfrom
feature/svelte-solid-examples

Conversation

@jlc488

@jlc488 jlc488 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

v0.5 shipped the Svelte and Solid adapters, but examples/ still held only vanilla/vue/react — so the README's Try it online row listed three frameworks and read as if the other two weren't supported. That's what prompted this.

Both are mini Vite projects consuming the published package (the same shape StackBlitz builds), each exercising what's adapter-specific:

  • SvelteonValue (canonical "1500000") next to bind:value (display "1,500,000", re-synced after formatting), plus an Indian lakh field.
  • Soliduse:numkey with onValue, the useNumkey ref factory, plus lakh.

Note on the toolchain

@sveltejs/vite-plugin-svelte@6 peers on vite ^6 || ^7 and fails to install against the vite 8 the other examples use. v7 is the release that peers on vite 8; it pulls svelte ^5.46.4.

Verification

npm install + npm run build for each, then served each build and drove it in a real browser (build success alone wouldn't catch runtime wiring):

  • Svelte: typing -9876543 → field -9,876,543, onValue"-9876543", reading -987만 6,543 원; bind:value field → "1,234.56"; lakh field 1,23,45,678. (Svelte 5 flushes DOM updates asynchronously, so the assertions wait a tick — reading synchronously shows stale text.)
  • Solid: signal readout tracked the typed value, ref factory and lakh field both correct.

Try-online rows updated in both READMEs.

v0.5 shipped the Svelte and Solid adapters but examples/ still held only
vanilla/vue/react, so the README's try-online row listed three frameworks
and read as if the other two were unsupported.

Both examples are mini Vite projects consuming the PUBLISHED package, the
same shape StackBlitz builds. They cover the adapter-specific parts:
Svelte shows onValue (canonical) beside bind:value (display, re-synced
after formatting); Solid shows the use: directive with onValue plus the
useNumkey ref factory; both demo Indian lakh grouping.

@sveltejs/vite-plugin-svelte 6 peers on vite ^6||^7 and would not install
against the vite 8 the other examples use — v7 is the release that peers
on vite 8, and it pulls svelte ^5.46.4.

Verified by npm install + build + serving each build and driving it in a
real browser: Svelte canonical/display readouts and lakh field all
correct (Svelte 5 flushes DOM updates asynchronously, so the check waits
a tick), Solid signal readout and ref factory likewise.
@jlc488
jlc488 merged commit e4c131e into main Aug 8, 2026
1 check passed
@jlc488
jlc488 deleted the feature/svelte-solid-examples branch August 8, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant