You are here: Home » NewsFeeds » React 16.4 release notes (pointer events)

React 16.4 release notes (pointer events)

The latest minor release adds support for an oft-requested feature: pointer events!
It also includes a bugfix for getDerivedStateFromProps. Check out the full changelog below.
Pointer Events
The following event types are now available in React DOM:
onPointerDown
onPointerMove
onPointerUp
onPointerCancel
onGotPointerCapture
onLostPointerCapture
onPointerEnter
onPointerLeave
onPointerOver
onPointerOut
Please note that these events will only work in browsers that support the Pointer Events specification. (At the time of this writing, this includes the latest versions of Chrome, Firefox, Edge, and Internet Explorer.) If your application depends on pointer events, we recommend using a third-party pointer events polyfill. We have opted not to include such a polyfill in React DOM, to avoid an increase in bundle size.
Check out this example on CodeSandbox.
Huge thanks to Philipp Spiess for contributing this change!
Bugfix for getDerivedStateFromProps
getDerivedStateFromProps is now called every time a component is rendered, regardless of the cause of the update. Previously, it was only called if the component was re-rendered by its parent, and would not fire as


 

Original article