Repository navigation
feat(solid): add Solid 2 next to Solid 1 - #330
Merged
Merged
Conversation
Solid 2.0 is stable since 2026-11-16. The previous Solid snippets become solid1, and solid2 holds the 2.0 versions: onSettled replaces onMount, merge replaces mergeProps, the context is its own provider, render comes from @solidjs/web, and fetch-data uses an async createMemo with Loading and Errored. The solid family and old /compare/*-solid URLs now resolve to Solid 2. The Solid playground runs 2.0 by default, so Solid 1 links failed on onMount. Each playground link now pins its version with an import map.
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.
Requested by Mathieu · project thread
solid-js@2.0.0). The previous snippets move tosolid1;solid2changes 8 of them, following the migration guide:onSettledreplacesonMount(and returns the interval cleanup),mergereplacesmergeProps, the context is its own provider,rendercomes from@solidjs/web,setNamemoves out of the component body (Solid 2 forbids writes there), and fetch-data uses an asynccreateMemounder<Loading>and<Errored>. Thesolidfamily,?f=solid, saved selections and the old/compare/*-solidURLs now resolve to Solid 2 (301).onMount. Each link pins its version through animport_map.jsontab (1.9.19 or 2.0.0), and "Render app" opens from its ownmain.jsx./og/react-vs-solid.pngand the other old slugs still render.Checks: the 22 Solid 2 examples run clean under Vite dev with Solid's dev diagnostics on (a Solid 1 snippet triggers
REACTIVE_WRITE_IN_OWNED_SCOPEas a control); playground links open in Chromium on v1.9.19 and v2.0.0;vp test(36),check:ciandbuildpass.Known gap, unchanged:
scripts/npmDownloadStats.tssendssolid-js@^1like it already sendsvue@^2, which the npm downloads API does not accept.