Solid 2.0: Async Integration and Tooling Overhaul
Better Stackgo watch the original →
the gist
Solid 2.0 integrates async data directly into the reactive graph, removes legacy primitives like createResource and batch, introduces a Rust-based compiler, and absorbs SolidStart functionality into the core Vite plugin.
Reactive Async and State Management
Solid 2.0 shifts async data handling from the createResource primitive to native reactive graph integration. Computations can now return promises directly, allowing developers to use async values within createMemo without managing undefined states or manual null checks. The framework replaces Suspense with Loading boundaries and SuspenseList with Reveal components. For optimistic updates, the framework introduces createOptimistic and createOptimisticStore, which provide automatic rollback functionality if an underlying API call fails. Stores have been simplified to support direct mutation of draft objects, effectively removing the need for the produce function and createMutable.
Effects, Signals, and JSX Refinements
Effects are now split into two functions: a tracking function for dependencies and an untracked function for side effects, replacing the on primitive. Cleanup logic has moved from the onCleanup function to a return value pattern within the effect or onMount (now onMount returns a cleanup callback). Signal writes are now staged and committed on the next microtask, which removes the need for batch as consecutive writes are automatically grouped. JSX syntax has been streamlined to align closer to standard HTML: classList is replaced by a more flexible class attribute, event listeners use standard camelCase props, and the use: directive namespace is replaced by ref callbacks.
Compiler and Meta-Framework Integration
The new Rust-based compiler, built on Oxc, delivers significant build performance improvements, with benchmarks showing up to 355x faster compilation times. The Vite plugin now includes a native start mode, which provides file-system routing, SSR, and code-splitting capabilities. This shift effectively deprecates the standalone SolidStart meta-framework, as its core features are now integrated into the standard Solid build process. Deployments now target web-standard fetch handlers, removing the need for framework-specific adapters.