Latest Features and Fixes That Has Come Up with React 16.4.1getvivek
The new release of React 16.4.1 is now available and here in this blog, we will discuss the latest features that are found in the version.
With the latest React 16.4.1 release, we have received a lot of fixes, few experimental features, support for Pointer Events and some help with getDerviceStateFromProps().
The best part of the 16.4.1 release is the support for Pointer Events. This is a feature that people often requested in order to be aware of the events. The following events are now available in React DOM. onPointerDown, onPointerMove, onGotPointerCapture, onLostPointerCapture, onPointerUp, onPointerLeave, onPointerOver, onPointerEnter. Developers always had to access the mouse events in order to understand how the user was interacting with the application. But nowadays users are using touch screen or a stylus instead of a mouse. Pointer Events inherit mouse events so that the information can still be taken while expanding the varied forms of input interaction. But note that these events can only work in browsers that support the Pointers Events
Bugfix for getDerviceStateFromProps:
The latest React release includes a bugfix for getDerviceStateFromProps, which made some of the existing bugs in the React more consistent and apparent, especially in case your application was using an anti-pattern. The React team observed that the developers were confused about using getDerivedState and componentWillRevieveProps and hoped to push changes and even point out the cases where they have been misused. getDerviceStateFromProps is now called when a component is rendered irrespective of the cause of the update. Earlier, this was called only if the component was re-rendered by the parent. The improved behavior now ensures compatibility with React’s asynchronous rendering mode. This bug fix will not have any effect on most applications, but there may be some issues with a small fraction of the components.
There are also lots of other fixes and here is the list below:
Fix a crash in IE11 while restoring the focus to an SVG element
Fix any bug that prevented the context propagation in some cases
Fix the attributes incorrectly by getting them removed from custom element nodes
Fix re-rendering of components
Fix a false positive warning while using react-lifecycles-compat in
Fix input validation triggering unnecessarily in the Firefox
React Test Renderer:
Fix a testInstance.parent crash when the parent is a special node or a fragment
Fix the getDerviceStateFromProps() support in order to match the new React DOM behavior
forwardRef() component can now be discovered by the test rendered traversal method.
Fix the reading context that is provided from the tree managed by React DOM
There are many more details about the latest React release. Here we have only mentioned some important ones. For the best benefits from React, it is important that you remain updated to the latest version.