preact v10.0.0-alpha.3 Release Notes

Release Date: 2019-04-02 // about 5 years ago
  • ๐Ÿš€ 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