preact v10.3.3 Release Notes

Release Date: 2020-03-01 // about 4 years ago
  • _ tl;dr: Some minor changes which make this release safe to upgrade for everyone!_

    ๐Ÿš€ Another week, another Preact release! It seems like the previous one wasn't too long ago, but there are already so many cool changes in master that we're eager to bundle them in a neat release!

    Much improved conditional rendering

    ๐Ÿšš One insanely cool and very important change was done by @andrewiggins, who woke up one day and found a very elegant solution to handling conditionally rendered elements. Most virtual-dom-based frameworks mark a falsy result with some sort placeholder (sometimes referred to as "holes"), so that the diffing algorithm can ensure that elements are not moved around needlessly.

    ๐ŸŽ It's not just for performance though as they are some real world consequences to moving nodes around. The most common annoyance is <input>-elements losing focus whenever a parent is moved. With this change we are pretty confident that we squashed all known issues on that front ๐Ÿ‘

    ๐Ÿ‘Œ Improved SVG attribute casing

    ๐Ÿฑ SVG also received a big change by @steveharrison . It's his first contribution Preact and he already knocked it out of the park with an excellent PR. HE went through the whole SVG spec and noticed that we didn't match some of the weird casings of SVG-Attributes properly and his PR remedies that beautifully! ๐Ÿ’ฏ

    Preact sightings

    ๐Ÿฑ @pksjce finished her YouTube series where she reads through a portion of the Preact source code. With that she helped us tremendously in spotting areas in code which lacked comments and finally pushed us to create a proper "Contributing" guide. If you are considering contributing to Preact, this short document is well worth a read as it contains an overview of the repo's structure and answers for the most common questions regarding our code. That said if you feel like something is missing or you do have troubles understanding some sections of the source, please reach out to us! We're here to help and feedback about friction points is crucial to making Preact better for everyone ๐Ÿ‘

    ๐Ÿฑ Checking our official website you may have noticed some slight changes here and there. They're mostly to simplify navigation or to give our docs a more fitting structure. The long term plan is to integrate our learnings about the most common support questions we get and fill in those spots. @NJalal7 spotted a few of those areas and even found a bug in Preact in the process that we we're promptly able to fix ๐Ÿ™Œ

    ๐Ÿฑ Thank you so much to everyone who contributed code, helped us in narrowing down issues or participated in making Preact even better. Preact wouldn't be were it is now without you all โค๏ธ

    ๐Ÿ”‹ Features

    • Compat: Add isPropagationStopped fn to event (#2378, thanks @reznord)
    • 0๏ธโƒฃ Compat: Add isDefaultPrevented fn to event (#2377, thanks @teodragovic)
    • ๐ŸŽ Large performance boost in preact/debug (#2362, thanks @developit)

    ๐Ÿ› Bug Fixes

    Typings

    ๐Ÿšง Maintenance

    • โž• Add comment to clarify seemingly redundant string concatenation (#2369, thanks @mhmdanas)
    • ๐Ÿ“‡ Rename some variables to increase legibility (#2361, thanks @andrewiggins)
    • Combine searches in excessDomChildren into the same code block (#2356, thanks @andrewiggins)
    • ๐Ÿ›  Fix failing test by defaulting to empty array (#2353, thanks @JoviDeCroock)
    • โž• Add new test file for null placeholders (#2352, thanks @andrewiggins)