Change8

@solidjs/web@2.0.0-rc.4

Breaking Changes
📦 solid-jsView on GitHub →
1 breaking7 features🐛 5 fixes🔧 16 symbols

Summary

Introduces a new per-call server function invocation API (`invoke`) with advanced options and significantly enhances the patch-mode list driver for improved performance and handling of dynamic lists and optimistic updates. Also includes fixes for SSR, hydration, and server module exports.

⚠️ Breaking Changes

  • The `invoke` function's wrapper contract has been clarified. Wrappers that share calls (deduping caches, multicast channels) must now explicitly opt-in or decline to be compatible. Callers encountering errors with `invoke` should now refer to the underlying reference or the wrapper's own error handling idioms.

Migration Steps

  1. Review wrappers that share calls (deduping caches, multicast channels) and ensure they explicitly opt-in or decline to work with the clarified `invoke` contract.

✨ New Features

  • Introduced `invoke(fn, options, ...args)` for per-call server function invocation with invocation-scoped options like `signal`, `keepalive`, and `priority`.
  • Patch-mode list hydration now claims and registers items positionally, improving server HTML integrity until the first transition.
  • Keyed `<For>` over store arrays is now supported by the patch-mode list driver, enabling better performance for dynamic lists.
  • The list driver now handles structural mutations on setter-channel stores (push/splice/index assignment/permutation) by emitting identity-keyed row ops.
  • Shallow store lists are now supported through the compiled driver, with slot patches graduating to channel semantics.
  • Module-level "use server" exports now register by value, ensuring server-side wrappers compose correctly on all call paths.
  • Optimistic family arrays are now drivable by the patch-mode list driver, enabling structural optimism and identity-diffed row ops.

🐛 Bug Fixes

  • External-audit fixes applied to the patch-list driver surface, ensuring family (projection/optimistic) arrays correctly decline the driver.
  • SSR `<select value>` resolution now correctly handles empty-string bound values, resolving an issue where pre-hydration pages showed the first option instead of the selected empty string.
  • Fixed whole-document hydration issues that occurred when `useHead` coexisted with shell-authored `<head>` children.
  • The list driver's identity matching now correctly unwraps store proxies on both sides, resolving issues with draft-authored permutations.
  • Anonymous default expressions for "use server" exports are now synthesized and registered, preventing them from being silently dropped.

Affected Symbols