From 1dfdfd85956f228a56fcf1348b49171bd9498ee9 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Wed, 23 May 2018 15:22:15 -0700 Subject: [PATCH] Pointer events section --- content/blog/2018-05-23-react-v-16-4.md | 27 ++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/content/blog/2018-05-23-react-v-16-4.md b/content/blog/2018-05-23-react-v-16-4.md index bd12c901b..889d6db6e 100644 --- a/content/blog/2018-05-23-react-v-16-4.md +++ b/content/blog/2018-05-23-react-v-16-4.md @@ -1,13 +1,30 @@ --- -title: "React v16.4.0: Experimental Component Profiler and Bugfixes" -author: [acdlite, bvaughn] +title: "React v16.4.0: Support for Pointer Events" +author: [acdlite] --- -React 16.4 is a minor release that includes an experimental component profiler, as well as a crucial bugfix for `getDerivedStateFromProps`. +React 16.4 adds an oft-requested feature: pointer events! -## `React.unstable_Profiler` +It also includes a bugfix for `getDerivedStateFromProps`. Check out the full [changelog](#changelog) below. -TODO (@bvaughn) +## 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, since it would bloat the bundle size. + +Huge thanks to [Philip Spiess](https://github.com/philipp-spiess) for contributing this change! ## Bugfix for `getDerivedStateFromProps`