Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

3.0.0

Compare
Choose a tag to compare
@developit developit released this 24 Aug 14:59
· 174 commits to master since this release

Breaking: render()

  • render() will now remove elements not included in the diff (#150, thanks @MobiusHorizons!)
  • Technically a breaking change, now behaves the same as React:
import { render, createElement } from 'preact-compat';

console.log(document.body.outerHTML);
// <body>blah<div>asdfasdf</div><span>hello</span></body>

render(<div id="foo">Foo</div>, document.body);

console.log(document.body.outerHTML);
// <body><div id="foo">Foo</div></body>

(note: <div> from first log is the same as the second)

Better compatibility with ES Bundlers like Rollup!

  • Add "modules" field to package.json (#144, thanks @piuccio!)
  • Remove internal use of JSX
  • Switched from Babel to Bublé for the build, saves 300 bytes.