Changelog History
Page 1
-
v10.5.7 Changes
November 12, 2020- ๐ Fix
compat/jsx-runtime
missing in npm package (#2827, thanks @marvinhagemeister)
- ๐ Fix
-
v10.5.6 Changes
November 12, 2020๐ Bug Fixes
- Throw when hook is invoked outside of render (#2816, thanks @marvinhagemeister)
- ๐ Make
jsx-runtime
work when using an alias (#2805, thanks @JoviDeCroock) - ๐ Allow rendering from an effect (#2804, thanks @JoviDeCroock)
Types
- โ Add
animateTransform
tag type (#2822, thanks @HuHguZ) - โ Add
displayName
to context (#2820, thanks @max-voronov) - ๐ Improve
style
attribute types (#1797, thanks @mnkhouri) - ๐ General JSX types export for
jsx-runtime
, fixes TS4.1 compatibility (#2811, thanks @ddprrt) - ๐ Make
ref
types' current property non-optional (#2803, thanks @ivantm)
๐ง Maintenance
- โ Remove circular
vnode
reference and golf implementation (#2517, thanks @JoviDeCroock) - โ Add hydration suspend tests (#2755, thanks @andrewiggins)
- ๐ Fix prototype spies not being reset in tests (#2823, thanks @marvinhagemeister)
-
v10.5.5 Changes
October 18, 2020๐ Bug Fixes
- Reset hooks state when
Suspense
triggers (#2796, thanks @JoviDeCroock) - โ Run parent effects when child throws (#2794, thanks @sventschui)
Typings
- ๐ Fix memo function types definition (#2793, thanks @dzhykaiev)
- Reset hooks state when
-
v10.5.4 Changes
October 05, 2020_ 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 inpreact/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
- Emit error event for errors handled by an error boundary (#2784, thanks @sventschui)
- ๐ Fix
className
descriptors on Elementvnodes
(#2786, thanks @developit) - Give precedence to
className
overclass
(#2782, thanks @JoviDeCroock)
-
v10.5.3 Changes
September 28, 2020๐ This release fixes a regression in regards to
class/className
handling inpreact/compat
. We encourage everyone to upgrade.๐ Bug Fixes
- ๐ Fix
className
normalization (#2774, thanks @JoviDeCroock) - ๐ Fix edge cases for thrown
Promises
in Suspense (#2776, thanks @kitten)
๐ง Maintenance
- Replace custom script with
check-export-map
(#2777, thanks @marvinhagemeister) - โฌ๏ธ Upgrade bench infra and add tachometer PR reporter (#2775, thanks @andrewiggins)
- Optimizations for preact/jsx-runtime (#2771, thanks @developit)
- ๐ Fix
-
v10.5.2 Changes
September 23, 2020- ๐ Fix incorrect package export for
jsx-runtime
(#2769, thanks @marvinhagemeister)
- ๐ Fix incorrect package export for
-
v10.5.1 Changes
September 23, 2020 -
v10.5.0 Changes
September 23, 2020๐ 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 backchildren
to props and just makes the implementation simpler. As a nice benefit users won't need to manually importh/createElement
anymore ๐// input\<li key="foo"\>foobar\</li\>// outputjsx("li", { children: "foobar" }, "foo");
Usage with babel:
// babel.config.jsmodule.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
- โ Add
jsx-runtime
support (#2764, thanks @JoviDeCroock, @marvinhagemeister) - Implement Suspend & Resume for both hydration and new tree construction (#2754, thanks @developit)
๐ Bug Fixes
- ๐ Fix unable to set progress value to
0
(#2757, thanks @marvinhagemeister) - ๐ Fix capturing and non-capturing listeners on the same element (#2740, thanks @devongovett)
- Prevent cursor jumps inside
contenteditable
(#2701, thanks @sventschui) - โ Add length check for hooks dependency array (#2729, thanks @JoviDeCroock)
- ๐ Fix rendering children as zero number (#2725, thanks @JiLiZART)
- ๐
Avoid assigning to readonly
style
(#2723, thanks @JoviDeCroock)
๐ง Maintenance
- โ Add mangle key for
_suspended
(#2765, thanks @marvinhagemeister) - Compat Optimizations (v11 backport) (#2752, thanks @developit)
- โ Add version check to issue template (#2731, thanks @marvinhagemeister
- โ Add
-
v10.4.8 Changes
August 26, 2020_ tl;dr: A good handful of bug fixes make this release the ideal candidate to upgrade! Should be very safe to upgrade_
๐ Thanks to all the people who made this release possible! This is for everyone who took part in our discussions, helped report issues, did code contributions or just spread the word. Thank you all for another amazing release ๐
Golfing
- โ Remove all the bytes (#2665, thanks @developit)
๐ Bug Fixes
- ๐ Fix state turned
readonly
in update fn (#2717, thanks @marvinhagemeister) - ๐ Fix deprecation warnings flooding console with
preact/debug
(#2711, thanks @marvinhagemeister) - ๐ Initialize normalized props with
undefined
instead ofnull
inpreact/compat
(#2695, thanks @aralroca) - โ Add React "secret or fired" shim for
react-relay
(#2692, thanks @marvinhagemeister) - Properly unset
href
on nullish value (#2693, thanks @marvinhagemeister) - 0๏ธโฃ Go back to
undefined
as default value foruseRef
(#2689, thanks @marvinhagemeister) - ๐
preact/debug
: Add component stack to prop type validation error, do not pass ref to prop-types validation (fixes mui incompatbility) (#2685, thanks @sventschui)
Typings
- Automatically add
dom
lib (#2713, thanks @Gerrit0) - โก๏ธ Update
useDebugValue
typings to align with React (#2699, thanks @leader22) - โ Remove
useErrorBoundary
compat types (#2631, thanks @38elements) - โ Add support for
IntrinsicElements
inComponentProps
(#2680, thanks @remcohaszing)
๐ง Maintenance
- โก๏ธ Update slack link in
CONTRIBUTING.md
(#2702, thanks @marvinhagemeister) - ๐ Fix invite link (#2697, thanks @JoviDeCroock)
-
v10.4.7 Changes
August 05, 2020_ tl;dr: This is a bug-fix only release and safe to upgrade ๐_
๐ This release contains some amazing fixes by first time contributors! Thank you so much for everyone who filed issues or contributed PRs โค๏ธ
๐ Bug Fixes
- Avoid touching DOM-attributes during hydration (#2679, thanks @JoviDeCroock)
- ๐ Fix incorrect
download
attribute handling (#2674, thanks @marvinhagemeister) - ๐ Allow the same component to be suspended multiple times (#2661, thanks @tanhauhau)
- ๐ Allow resolve promise after suspense unmounted (#2664, thanks @tanhauhau)
- Throw when hook is used inside effect (#2672, thanks @marvinhagemeister)
- ๐ Fix incorrect text node handling in
diffElementNodes
(#2658, thanks @perseveringman) - 0๏ธโฃ Default
useRef
tonull
(#2648, thanks @JoviDeCroock) - ๐ Fix calling
setState
inconstructor
(#2640, thanks @sventschui)
Types
- ๐ Change argument of
useRef
to optional (#2651, thanks @38elements) - โก๏ธ Updated
capture
definition. (#2643, thanks @JonathanBristow) - โก๏ธ Update
preact/compat
types (#2628, thanks @jeremy-coleman)
๐ง Maintenance
- ๐ง Run benches on linux VMs (#2595, thanks @andrewiggins)
- ๐ Fix
package.json
"authors" field (#2635, thanks @developit)