preact
11.2.0 · 6 Nov 2026MIT63.2M / weekRepositoryHomepagenpmAtom feed
10.29.8 is the newest release of 10.x.
In short
1 new1 fixed1 internal
Release note
tl;dr: A tiny maintenance release, which helps with debugging Preact apps.
This release is a lot smaller compared to our usual ones, but we deemed one feature important enough to have in users hands that we made this release. And that's component stacks which we hope will reduce the issue count in our tracker slightly :tada:
On top of that we want to congratulate @jamesb3ll for his first-time contribution to Preact :1st_place_medal: He found an issue and filled it with every detail one can imagine (codesandbox is awesome!). But instead of stopping there, he tinkered a bit and found a genius fix for it! Thank you for your PR :+1: :four_leaf_clover:
Component Stacks
Whenever you include preact/debug you get a lot of hints and warnings about how you can make your application better. But sometimes it was hard to tell where the error originated from. To resolve that we automatically append a component stack trace telling you directly which component threw the error.
class Foo extends Component {
constructor(props) {
super(props);
// Doesn't do anything, `this.state = { foo: true }`
// should be used instead.
this.setState({ foo: true });
}
render() {
return <div>foo</div>;
}
}
function Bar() {
return <Foo />;
}
function Baz() {
return <Bar />;
}The above code will print the following warning to the browser's console:
Screenshot from 2019-12-16 20-55-21
With the stack appended at the bottom it's much easier to track down the source :100: To get those beautiful file and line mappings, make sure that you have @babel/plugin-transform-react-jsx-source enabled in your babel config :+1:
Features
Add component stack in debug warnings (#2179, thanks @marvinhagemeister)
Bug Fixes
Fix
componentWillReceivePropsnot called on child component when parent is queued in the same commit (#2186, thanks @jamesb3ll)
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.