Preact Compat Versions Save

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.

3.19.0

4 years ago

? Reminder: This module is for Preact 8.x and prior - Preact X includes compat by default. For Preact X, please uninstall preact-compat and replace your aliases with preact/compat.

  • adds support for createContext(), courtesy of preact-context (#529, thanks @probablyup!)

3.18.5

5 years ago

Reminder: preact-compat should never be used with Preact X.

preact-compat should never be used with Preact X. Doing so will have unintended consequences including the pollution of Object.prototype (example).

This release of preact-compat changes peerDependencies to warn when installing alongside Preact 10+. You can (and should) continue to use preact-compat in conjunction with Preact 8 and prior.

If you're having trouble finding references to preact-compat in your codebase, try using a Webpack alias:

resolve: {
  alias: {
    'preact-compat': 'preact/compat'
  }
}

Other things in this release:

  • Automatic browserify NODE_ENV support (#510, thanks @evandeininger)
  • Export createRef() (added in Preact 8.4)
  • Export hydrate() alias

3.18.4

5 years ago
  • Fix dev mode always being false when bundlers don't inline process={} (#504, thanks @marvinhagemeister!)

3.18.3

5 years ago

Quick bugfix: findDOMNode() should return an element if given one (#493, #495 - thanks @billneff79 & @zhaopeifei)

3.18.2

5 years ago
  • Support for createPortal() (#452, #486)
  • Avoid triggering insertion of a process shim in bundlers (#403, #472 - thanks @kaisermann)

Important security patch

3.18.2 fixes an HTML injection vulnerability (CVE-2018-6341), so we encourage everyone to update. The fix is contained in [email protected], used by preact-compat/server.

See React's detailed notes for more information. Thanks for @gaearon and the React team for the coordinated fix!

3.18.0

6 years ago
  • Implement react-dom-factories (#456, thanks @freeman)
  • Call getDefaultProps on the class so static properties are available (#421, @joeyrobert)
  • Fix cloned props.children issue (#415, thanks @kozak)
  • Fix IE11 lacking Symbol.for() (#423, @xxxiin)

3.17.0

6 years ago
  • Add context for callback function in renderSubtreeIntoContainer() to match React (#399, @lsroman)
  • Make Children.toArray() always return a new array (#395, @ustccjw)
  • bugfix: array data children were converted to an object (#384, @luolonghao)
  • Improve render parent check in render (#387, @silverlight513)
  • props.className is now an alias of props.class (#412)
  • Add vectorEffect to the list of camel case properties (#409, @icewind1991)
  • Add React.__spread export since it's already available (#407, @gnarf)
  • PureComponent prototype now includes isPureReactComponent: true

3.15.0

7 years ago
  • Adds lib/update (#260, #339 - thanks @slaskis!)
  • Fix Children.toArray when passed undefined (#341 - thanks @AlexanderOtavka!)
  • Switch to the official prop-types package (#359, #362 - thanks @conceptualitis, @DonnieWest, @tkh44)
  • Tests updated to Preact 8 and non-empty children issue fixed.

3.14.3

7 years ago
  • Fix ES Modules bundle being missing from 3.14.2 (#332, thanks @0xR!)

3.14.2

7 years ago
  • Fixes an issue where children could be mutated across VNodes (#330, thanks @conorhastings!)