github preactjs/preact 8.3.0

latest releases: 10.20.1, 10.20.0, 10.19.7...
5 years ago

New Features!

🙌 We've added support for the new getDerivedStateFromProps() and getSnapshotBeforeUpdate() lifecycle hooks. (#1094 & #1112). A huge thank-you to @andrewiggins and @marvinhagemeister for their amazing work on this!

Improvements

  • We're shipping .mjs now! (#1165, thanks @mathiasbynens for the nudge)
  • Fix an issue where setState() could mutate state in-place (#1170, thanks @mitranim for the fix and @dandv for digging into the Apollo issue!)
  • spellcheck={false} is now set as an attribute (#1110, thanks @marvinhagemeister!)
  • Some code golfing to offset the new lifecycle methods (#1122, thanks @andrewiggins, @marvinhagemeister)
  • A little perf/size tweak for render callbacks (#1113, thanks @valotas)
  • Someone found dead code in Preact! awesome. (#890, thanks @MrErHu & @clarkdo)
  • We've dropped IE9 and IE10 from our SauceLabs tests (thanks @mkxml!)

    Note: Preact will continue to support these browsers (that is to say, continue to avoid relying on features they don't support), but recent updates to Mocha mean our tests don't run there. Special thanks to @mkxml, @andrewiggins, @k1r0s and @marvinhagemeister for working to improve the test suite in this release!

TypeScript Improvements!

  • Add support for specifying the types of a component's children (#1116, thanks @Alexendoo)
  • Add on*Capture event handler attributes and PointerEvents to the TS definitions (#1101 #1102, thanks @jakearchibald)
  • Improve render()'s return type (#1085, thanks @valotas)
  • Add controlsList attribute for media elements (#1134, thanks @wayou)

Don't miss a new preact release

NewReleases is sending notifications on new releases.