Repository navigation
solid-js@2.0.0-rc.17
Pre-releasePatch Changes
-
db8241c: A cleanup (
onCleanupor an effect's returned cleanup) that throws no longer aborts the rest of the teardown: every other cleanup in the tree still runs, and the first error is rethrown once the teardown is done. Outside a flush (a root'sdispose()), the dispose call rethrows it. Inside a flush (a branch switch retiring a frame, a pass replacing an uncommitted one, an effect disposing a root),flush()rethrows it after the flush has finished, so commits and effects are never left half-applied, and lazy nodes released before the throw are still released. Anunobservedhook that throws is handled the same way. If an uncaught error halts the reactive system, a collected cleanup error is dropped rather than surfacing later from an unrelateddispose(). On the server,disposeOwnerruns every cleanup the same way, sorenderToStream's final dispose still reports the error (#4193). -
690228a: Clearer dev message for
ContextNotFoundError(#4181).undefinedstill means "not provided" for context, but the message now names the context and says which case it hit: no provider and no default; acreateContext(undefined)default, which is no default; or a provider that passedundefined, which counts as not provided. Each suggestsnullas the explicit empty value (createContext<T | null>(null)). Applies on the client and the server. Production messages and bundles are unchanged. The context docs and cheatsheet now say thatundefinedis "not provided" and thatnullis how to make a context optional. -
a2a5b6f: The migration guide notes when a
from()async generator's cleanup runs, the cheatsheet addscreateDeferred, and the docs note thatSETTLED_CLEANUP_UNOWNEDthrows in development (#4183). -
0771dc8: Docs: effects never compare compute values. The effect half (and the previous cleanup) runs every time the compute half re-runs, even when compute returned an equal value. To skip work on an unchanged value, read a
createMemo(optionally withequals) in the compute. Noted in thesolid-2.0skill and the cheatsheet (#4184). -
d682022: Document how form inputs work with
value/checkedbindings: draft signals for editable fields, writing rejected input back in the handler (orequals: false), uncontrolled inputs, and spreads (#4185). -
6cca8b5: Dev builds now warn with
UNCOMMITTED_INPUT_OVERWRITTEN(#4186) when a stateful DOM property binding (value/checkedon an input,valueon a textarea,value/selectedon an option,mutedon media) is about to re-write the value it wrote last time over an edit the user never committed to the bound signal — e.g.value={props.name} onChange={commit}with no draft signal, when another dynamic attribute in the same template changes. Runtime behavior is unchanged: the write still happens, once per element and property the warning names the fix (write the signal fromonInput, usedefaultValue/defaultCheckedfor an uncontrolled element, or write a rejected edit back withe.currentTarget.value = next).Production output is unchanged byte for byte. In dev DOM output both compilers write stateful properties through a new
setStatefulProperty(el, name, value)helper instead of the inlineel.name = value; hydratable output keepssetProperty, andspread/assigncheck in the runtime. The check lives only in@solidjs/web's dev build; the production entry carries a plainnode[name] = valuestub that no production-compiled module imports, so it tree-shakes away.The "Form inputs" section of the DOM RFC, the cheatsheet and the solid-2.0 skill now say that a change to any other dynamic attribute in the same template re-runs a stateful binding, link the new code, and drop
equals: falseas a way to reject input (it is what the warning reports); write the accepted value back withe.currentTarget.value = nextinstead. -
Updated dependencies [db8241c]
-
Updated dependencies [690228a]
-
Updated dependencies [3373ae1]
-
Updated dependencies [411f73b]
-
Updated dependencies [ee4963a]
-
Updated dependencies [2c442c4]
-
Updated dependencies [b2d9ed0]
-
Updated dependencies [f7f30b9]
-
Updated dependencies [a99550e]
-
Updated dependencies [6cca8b5]
-
Updated dependencies [0117658]
- @solidjs/signals@2.0.0-rc.17