Packages

preact

11.2.0 · 6 Nov 2026MIT63.1M / weekRepositoryHomepagenpmAtom feed

Your version

10.25.0

22 Nov 2024Where it was published

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

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.