Articles by Chetan Gawai

ECMAScript: Top-level await

We can only use await operator within an async method. In ECMAScript 2022 we will be able to use it outside of the context of an async method in our modules.

Understanding static class features in JavaScript (ECMAScript 2022)

Private and public static fields along with private static methods would be officially included in ECMAScript 2022.

Deep dive into public and private instance fields in JavaScript (ECMAScript 2022)

Class fields declaration allows declaring fields, up-front making class definitions become more self-documenting. As declared fields are always present, instances go through fewer state transitions. These class fields features would be officially included in ECMAScript 2022.

Keep the React app responsive even during large screen updates with startTransition API introduced in React 18

The newly introduced startTransition API helps to improve the user interactions by categorizing the state updates as urgent and non-urgent.

React 18 improves the existing behavior of Suspense

React 18 delays committing everything inside the Suspense boundary (the suspended component and all its siblings) until the suspended data resolves.

React 18 introduces new root API ( ReactDOM.createRoot )

React 18 adds the new root API that comes up with the new out-of-the-box improvements.

React 17 runs useEffect cleanup functions asynchronously

React 17 executes useEffect cleanup functions asynchronously, improving the performance of large applications.

Redux 4.1.0 converts error messages from strings to error code indexes

Redux 4.1.0 extracts error messages from production build, converts them into error code indexes, thereby shrinking the bundle size.

React 17 removes event pooling in the modern browsers

React 17 removes event pooling in modern browsers as it does not improve the performance and causes confusion.

React 17 stops event bubbling in scroll event

In React 17 the scroll event no longer bubbles to align with browser's behavior.