docs: runnable Svelte + Solid examples, try-online links - #17
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
onValue(canonical"1500000") next tobind:value(display"1,500,000", re-synced after formatting), plus an Indian lakh field.use:numkeywithonValue, theuseNumkeyref factory, plus lakh.Note on the toolchain
@sveltejs/vite-plugin-svelte@6peers onvite ^6 || ^7and fails to install against the vite 8 the other examples use. v7 is the release that peers on vite 8; it pullssvelte ^5.46.4.Verification
npm install+npm run buildfor each, then served each build and drove it in a real browser (build success alone wouldn't catch runtime wiring):-9876543→ field-9,876,543,onValue→"-9876543", reading-987만 6,543 원;bind:valuefield →"1,234.56"; lakh field1,23,45,678. (Svelte 5 flushes DOM updates asynchronously, so the assertions wait a tick — reading synchronously shows stale text.)Try-online rows updated in both READMEs.