github preactjs/preact 6.3.0

latest releases: 10.22.0, 10.21.0, 10.20.2...
7 years ago

With 6.3.0, the children prop (on a VNode) is now always an Array, even if there are no children. This allows us to skip an existence check when plucking children within render:

// 6.2.1 & prior:
({ children }) => children && children[0];

// As of 6.3.0:
({ children }) => children[0];

This change is backwards compatible since previously an empty array was already being returned for no children in some cases. Now it's just more consistent! 🌈

Don't miss a new preact release

NewReleases is sending notifications on new releases.