github preactjs/preact 4.6.2

latest releases: 10.24.3, 10.24.2, 10.24.1...
8 years ago
  • 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!

Don't miss a new preact release

NewReleases is sending notifications on new releases.