Skip to content

Releases: preactjs/preact

5.3.1

19 Jul 04:36
Compare
Choose a tag to compare
  • Fix for erroneously recycled components

5.3.0

17 Jul 05:12
Compare
Choose a tag to compare

🎉 Preact 5 is here! 🎈

Version 5 represents a fairly major jump forward. It should be backwards-compatible, but major version increment is to signify a few new features that will not be made available in older versions - mainly built-in SVG support, and async rendering.

Take a few seconds and upgrade, you'll be happy you did! 🌈

Tip: If you're using preact-compat, it's best to upgrade that to 2.0.0 at the same time. Since Preact 5+ now includes built-in support for SVG, preact-compat@2 drops the preact-svg dependency, saving you around 1.7kb.


Along with the lovely stable stamp, this release includes some finishing touches:

Bug Fixes

  • Fix case where a ref may be nulled before a component is unmounted (#232, thanks @slmgc!)
  • Ensure remounting component trees invokes mount lifecycle events for deeply nested children (thanks to @kruczy @Madumo et al for their help with this!)

New Features

  • Style objects now have a lightning fast pipeline out to the DOM. (#228, thanks @trashhalo!)

    Example:
    <div style={{ foo:'bar '}} /> now diffs against the current style rather than stringifying the object

5.2.0-beta.0

14 Jul 04:35
Compare
Choose a tag to compare
5.2.0-beta.0 Pre-release
Pre-release
  • Fixed lifecycle event DOM timing! #65 and #96
  • Fixed swapping issue #230

5.1.0-beta.22

30 Jun 17:30
Compare
Choose a tag to compare
5.1.0-beta.22 Pre-release
Pre-release

Features

5.1.0-beta.21

30 Jun 13:41
Compare
Choose a tag to compare
5.1.0-beta.21 Pre-release
Pre-release

Bug Fixes

  • #218 - Fix nested JSX text children resulting in multiple TextNodes (thanks @bardt!)

5.1.0-beta.20

30 Jun 13:31
Compare
Choose a tag to compare
5.1.0-beta.20 Pre-release
Pre-release

Minor Changes

  • Fix an inconsistency with how defaultProps are applied (preactjs/preact-compat#47)

    A key in props with a value of undefined should be treated as a missing key, and the value from defaultProps should be used in its place.

  • Switch setImmediate backend from MessageChannel to Promise#then (change diff)

    This is much faster!

    However: This comes with the caveat of being unusable for animation. While this matches the use-case for setImmediate() within Preact (debouncing rendering), it means that componentDidUpdate() and setState() callbacks should not be used as a means of animation. *

    * This is only true when using the built-in debounce mechanism. Overriding to requestAnimationFrame is still a great way to do animations via these hooks.

5.1.0-beta.19

30 Jun 13:30
Compare
Choose a tag to compare
5.1.0-beta.19 Pre-release
Pre-release

Bug Fixes

  • Fix an issue where swapping between functional and classful children of a high-order component could trigger an unmount in certain cases

    💁 If you're using preact-router, this fixes a redirect breakage

5.1.0-beta.18

23 Jun 00:41
Compare
Choose a tag to compare
5.1.0-beta.18 Pre-release
Pre-release

5.1.0-beta.17

21 Jun 23:06
Compare
Choose a tag to compare
5.1.0-beta.17 Pre-release
Pre-release

Bugfixes

  • Ignore props.children if children are manually specified (as jsx children, or the third argument to h())
  • Fix and test for the <svg class> bug @zhenkunou found and reported in #202
  • Tiny size optimizations to offset the cost of the above fix :)

5.1.0-beta.16

21 Jun 23:05
Compare
Choose a tag to compare
5.1.0-beta.16 Pre-release
Pre-release
  • Fix and (corrected) test for object style attribute serialization (#204) - thanks @katopz
  • 🎨 Add built-in support for inline SVG! (#202)