All Versions
46
Latest Version
Avg Release Cycle
14 days
Latest Release
1253 days ago

Changelog History
Page 5

  • v10.0.0-alpha.3 Changes

    April 02, 2019

    🚀 It's time for another Preact X release 🎉 The past weeks were very productive and we're very happy to have been able to improve Preact on many fronts.

    mjs is no more 💯 ✅

    🚀 We are very happy to have removed our .mjs bundles and are back with standard .js files. This was a common error when trying out the alpha with webpack because the resolution for mjs files is different. We're very thankful for @lukeed who stepped up and created a workaround with a custom webpack plugin that we have been referring to. But we all knew that we wanted to correct that with our next release and make Preact work out of the box with webpack again. This release does just that and you can safely remove webpack-modules 👍

    Developer Experience Enhancements 🛠

    🚀 For this release we spent a few days working on improving the developer experience when writing Preact apps. For that we added more warnings to preact/debug which should catch some common issues you may have run into. These will be visible in your browsers console 🎉

    • Warn on double encoding of JSX literals and other invalid nodes passed to createElement/h
    • Warn when an event handler is not a function
    • Warn when the container node passed to render() doesn't exist in the DOM
    • 👀 Warn on invalid dependencies passed to useEffect/useLayoutEffect

    Here is an example:

    error_js

    Other notable changes

    Thanks to the stunningly beautiful "people demo" that @phaux contributed we were able to catch two issues when using Preact together with mobx-react. Our compat shim is now on a level where mobx-preact isn't needed anymore (it was lagging behind in terms of features compared to mobx-react).

    people_demo2

    What's next

    🚀 We brought in the first batches of reconciler fixes but have a few pending changes left to do. These mainly include fixes that will make Fragment support rock solid and an enhancements to createContext. When these are stable we'll move forward to a beta release 👍 We even have some cool performance improvements in the pipeline 🤫

    You all are amazing!

    🍱 As always we'd like to take time to thank everyone who has filed issues or participated in discussion. The issues in particular are much higher quality than just a few months ago. We've received quite a few comments on twitter or in person from friends working on other OSS projects that they love our community and the positivity ours is known for. Just wanted to pass on the praise to you all 🎉 ❤️

    Without further ado, here is the full change set:

    🔋 Features

    🐛 Bug Fixes

    Typings

  • v10.0.0-alpha.2 Changes

    March 14, 2019

    🚀 The weekend is coming and we thought it be a good time to make another alpha release for everyone to play with 🎉

    🍱 This was a wonderful week for us. More and more bug reports contain links to a reproducible test case. You all are simply amazing! We wouldn't be able to fix this many bugs without all your help 👍 Even our contributions had an alltime high with excellent PRs from the community!

    📦 Despite fixing many bugs we landed a new package to help you test hooks in Preact 🎉

    ✅ Introducing preact/test-utils

    ⏱ With hooks having their own scheduling logic, we didn't have a good testing story up until now! First-time contributor @JoviDeCroock went right into it and quickly had a prototype running. With the blink of an eye he had a PR that was ready to be merged. These testing utilities are inspired by the excellent react-dom/test-utils tools and share a similar act() function 👍

    🔀 For testing hooks effectively we need to flush pending effects synchronously. The brand new act() function allows you to do just that:

    import { act } from "preact/test-utils";let spy = sinon.spy();function StateContainer() { useEffect(spy); return \<div /\>; }// Wrap the render() with `act` to flush hooks automaticallyact(() =\> render(\<StateContainer /\>, document.body));// Do your assertions 🎉expect(spy).to.be.calledOnce;
    

    ⚡️ If you're working with class-based components you can use the new setupRerender function to flush pending state updates in your tests:

    import { setupRerender, Component } from "preact/test-utils";// Setup rerender logic firstconst rerender = setupRerender();let updateState;class App extends Component { constructor() { super(); this.state = { count: 0 }; updateState = () =\> this.setState(prev =\> ({ count: ++prev.count })); } render() { return \<div\>count: {this.state.count]}\</div\>; } }// Render your componentrender(\<App /\>, dom);expect(dom.textContent).to.equal("count: 0");// Trigger a state updateupdateState();// Flush all state updatesrerender();expect(dom.textContent).to.equal("count: 1");
    

    🍱 It's his first contribution to Preact and we couldn't be more ecstatic about his work. Give him a round of applause 👍 It's also good to know for us that our code remains very accessible for new contributors.

    🐛 Bug-Fixes

    🐎 Performance

    • 🚚 Move _prevState for devtools out of core (#1379, thanks @developit)
    • Reuse oldChildrenLength to save bytes (#1386, thanks @yuqianma)
    • 💅 Don't call setProperty for style strings (#1394, thanks @choumx)

    Other

  • v8.5.3 Changes

    November 01, 2019
  • v8.5.2 Changes

    August 18, 2019

    🚀 This release is a maintenance release and all users of the 8.x release line are encouraged to upgrade to it.

    • 🛠 Fix devtools bridge not working with react devtools v4 (#1876)
  • v8.5.1 Changes

    August 08, 2019

    🚀 This is a maintenance release and fixes a minor issue with the packaging of the devtools import. All users on the 8.x release line are encouraged to upgrade.

  • v8.5.0 Changes

    August 02, 2019

    🚀 This is a maintenance release for Preact's 8.x versions. We'd like folks to try out Preact X, but if you're still using 8 we have you covered.

    🚀 This release includes support for createRef(), and updated TypeScript definitions.