Skip to content

Releases: preactjs/preact

10.5.9

03 Jan 12:31
aba653e
Compare
Choose a tag to compare

Happy New Year to everyone 🎉 Let's kick of the year with a few welcome bug fixes regarding preact/compat 👍

Bug Fixes

Maintenance

10.5.8

30 Dec 15:18
a9f7e67
Compare
Choose a tag to compare

This is probably the last release for 2020. Thank you everyone for the amazing contributions over the year and we can't wait to see where Preact is going in 2021! Lot's of interesting ideas are being worked on 🎉

Bug Fixes

Types

Other

Maintenance

10.5.7

12 Nov 22:00
cdb709e
Compare
Choose a tag to compare

10.5.6

12 Nov 18:49
b4d7a6c
Compare
Choose a tag to compare

Bug Fixes

Types

Maintenance

10.5.5

18 Oct 10:26
9443406
Compare
Choose a tag to compare

Bug Fixes

Typings

10.5.4

05 Oct 16:25
042be5e
Compare
Choose a tag to compare

tl;dr: Bug-Fix only release that should get rid of the last className edge cases. We encourage everyone to upgrade.

Despite our effort to account for all edge cases regarding className handling in preact/compat, we got some reports of some missed ones. This release corrects those 🎉

This release contains a fix to increase compatibility with next.js that ensures that the error overlay will show up.

Bug Fixes

10.5.3

28 Sep 21:02
8603d70
Compare
Choose a tag to compare

This release fixes a regression in regards to class/className handling in preact/compat. We encourage everyone to upgrade.

Bug Fixes

Maintenance

10.5.2

23 Sep 14:11
e32fc87
Compare
Choose a tag to compare

10.5.1

23 Sep 13:29
8446dcb
Compare
Choose a tag to compare
  • Fix publishing error with jsx-runtime package (#2767, thanks @johakr)

10.5.0 - JSX Reloaded

23 Sep 11:43
d7166c2
Compare
Choose a tag to compare

New JSX-runtime functions

This has been a long time in the making for various virtual-dom based frameworks. Historically JSX was always transpiled to createElement function calls.

// input
<div>foobar</div>

// output, we need to move "foobar" to `props.children`
createElement("div, {}, "foobar");

While this has served us well and is very reliable, it has proven to be hard to optimize. Most of the things we do in our createElement function could by done by babel directly, thereby making it smaller and faster. This is very desirable for us as this function is called a lot in any application. It's part of the so-called hot-path.

And that's exactly what the new signature does. It removes the need for us to pull out key from props, add back children to props and just makes the implementation simpler. As a nice benefit users won't need to manually import h/createElement anymore 🎉

// input
<li key="foo">foobar</li>

// output
jsx("li", { children: "foobar" }, "foo");

Usage with babel:

// babel.config.js
module.exports = {
  plugins: [
    ["@babel/plugin-transform-react-jsx", {
      runtime: "automatic", // defaults to classic (classic == createElement calls)
      importSource: "preact", // NOT preact/jsx-runtime
    }]
  ]
}

Note that the JSX transformer in TypeScript is a work in progress and will likely be released as part of version 4.1. We're currently running into microsoft/TypeScript#40502 though, so the JSX typings are not found.

Features

Bug Fixes

Maintenance