React 16.5 Adds Programmatic Profiler
Written by Kay Ewbank   
Tuesday, 13 August 2019

There's a new release of React with improvements including an asynchronous testing utility, a programmatic profiler, and an updated roadmap.

React is Facebook’s open source JavaScript library, which lets you describe what you want to render in a declarative way using shared components and elements. The first improvement to React is a programmatic way to call the profiler.

reactlogo

The new profiler was added in React 16.5 for DevTools to give a way to find performance bottlenecks in your application. The new release adds a way to gather measurements programmatically. The developers say that while they expect that it won't be used by most smaller apps, but developers working on larger apps will find it a handy way to track performance regressions over time. The profiler measures how often a React application renders and what the “cost” of rendering is. Its purpose is to help identify parts of an application that are slow and may benefit from optimizations. The call to the profiler can be added anywhere in a React tree to measure the cost of rendering that part of the tree.

The second improvement is a new way to include asynchronous functions in tests for browser behavior. The previous release of React added an API called act() that can be used to create such tests, but it could only deal with synchronous functions, so failed if the state update was inside an asynchronous function. This has now been rectified.

The updated roadmap is the other main point of interest in this release. The previous roadmap from November 2018 suggested that by now there would be a release with support for Concurrent Mode, and another with Suspense for Data Fetching. The developers say these releases were too optimistic, and they now plan to group both improvements into a single release later this year.

 

reactlogo 

More Information

ReactJS Site

Related Articles

The Programmers Guide To React

React 16 Adds Fragments 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


AI Art Auction - The Results
09/03/2025

Christie's online auction of AI-generated artworks that ran from February 20 to March 5 realized $728,784, compared to its $600,000 projection. The sale had an 82% sell-through rate, but is this reall [ ... ]



GitClear Reveals AI's Negative Impact On Code Quality
05/03/2025

Code assistants are increasingly taking on the task of code-writing. While this might seem welcome, research from GitClear reveals a negative impact on code quality, with more use of copy and pas [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 13 August 2019 )