preact
11.2.0 · 6 Nov 2026MIT63.1M / weekRepositoryHomepagenpmAtom feed
10.29.8 is the newest release of 10.x.
In short
6 fixed7 internal
Release note
Features
Move per-element type interfaces into core and more strictly type IntrinsicElements (#4546, thanks @rschristian)
This adds per-element typings for every DOM-node type, this means that our types might become slightly stricter when you are using DOM attributes/properties where they are not allowed, an example of this might be <div src="x" />.
If you notice any issues when upgrading tell us about them, we can evaluate whether we have missed a case.
Recreate unkeyed functional components when they change position. (#4550, thanks @JoviDeCroock)
This is a long time bugfix, when we have elements that look like
return (
{condition ? <Element /> : null}
{condition ? null : <Element />
)We would reuse the state of the first VNode to render the second one when the condition switches. When you are using key, this issue was not present.
Support { handleEvent() {} } object interface as a listener (#4538, thanks @lilnasy)
We've added support for attaching object/class event-handlers
let handler = {
onclick,
handleEvent() {
this.onclick()
}
}
<div onClick={handler} />Fixes
Ensure state updates work in signals (#4560, thanks @JoviDeCroock)
Ensure SVGAttributes includes height & width (#4556, thanks @rschristian)
Fork types for TS 5.1 and beyond (#4548, thanks @JoviDeCroock)
Re-add missing properties & property casings (#4554, thanks @rschristian)
Ensure we unwrap custom .then() (#4547, thanks @JoviDeCroock)
Fix error message when nesting invalid elements within <p> tags (#4534, thanks @jubalm)
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.