Skip to content

Releases: preactjs/preact

5.0.0-beta7

06 Jun 17:02
Compare
Choose a tag to compare
5.0.0-beta7 Pre-release
Pre-release

New Features

  • Add support for cloneElement(). See React's Docs for more.

Bug Fixes

  • Wrap DOM property assignment in a try{} block, as it can throw.
  • Fix element reordering regression (#174)

5.0.0-beta6

31 May 12:46
Compare
Choose a tag to compare
5.0.0-beta6 Pre-release
Pre-release
5.0.0-beta6

5.0.0-beta2

24 May 03:26
Compare
Choose a tag to compare

Potentially Breaking Changes

  • Switch to exclusively named exports. Fixes compatibility with ES Module bundlers like Rollup (#150).

Bug Fixes

  • Don't invoke shouldComponentUpdate() when updating via forceUpdate() (#158)
  • Fix diff self-correction issue that resulted in an unnecessary element removal and re-append (#159)

5.0.0-beta1

24 May 03:24
Compare
Choose a tag to compare

Potentially Breaking Changes

  • DOM event handlers are no longer invoked with the source element as their context (this) (#153)
  • Adding properties to context within a tree no longer overwrites, instead it extends/appends (#156)

Bug Fixes

  • Fix for high-order component mount lifecycle (#143)
  • Fix incorrect rendering of 0 values (#149)

Features

  • Add key property to VNodes (#155)

Optimization

Preact 4:

Preact 5:

4.8.0

26 Apr 20:30
Compare
Choose a tag to compare
  • Fix children being ignored when passed explicitly via props in certain cases. Fixes preactjs/preact-compat#44 (thanks @ld0rman!)

    Fun fact: this means you can now do: <div children={['hello!']} />

4.7.2

19 Apr 04:58
Compare
Choose a tag to compare
  • Bugfix: Fixes an issue caught by preact-compat's ref tests, where swapping the root node rendered by a component would null its ref twice.

4.7.1

19 Apr 04:26
Compare
Choose a tag to compare
  • Fix regression in 4.6.2 related to recycled component DOM not being treated as first render
  • A few small optimizations

4.7.0

18 Apr 13:20
Compare
Choose a tag to compare
  • Merge #106: removes some unnecessary code, drops ~50 bytes

  • Lazy-instantiate the internal mapping for linkState() and setState's callback queue.

    This reduces allocation cost for components. It also reduces overall memory consumption for classful components that don't make use of those given features (certainly the common case for setState callback)

4.6.3

18 Apr 13:17
Compare
Choose a tag to compare
  • Don't attempt to append a child to a parentNode if the child is the parentNode. Fixes Issue #126.

4.6.2

13 Apr 14:01
Compare
Choose a tag to compare
  • Optimize serialization of Objects to CSS strings to be about 5x faster (benchmark: https://esbench.com/bench/570daee0db965b9a009659f7)

  • Rethink solution to #120. TL;DR: fresh instances, cached DOM. Long version:

    Re-invoking the constructor on a class was not a great idea. Babel's transpiled constructors
    (and basically anything else) re-assign to the prototype, which is slow and a fairly bad idea.
    Also, and more importantly, it was assigning this.base to null, completely ignoring the
    main reason for caching components (caching their generated DOM using the component itself
    as a cache key). This commit changes the behavior to discard the cached component instance
    itself, re-using only the base by copying it to a fresh instance. Best of both worlds!