Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

Diving into the new JSX transform

Blog post from LogRocket

Post Details
Company
Date Published
Author
Kristofer Selbekk
Word Count
922
Language
-
Hacker News Points
-
Summary

React 17 has introduced a new feature that eliminates the need to import React in files using JSX, simplifying the development process by automatically importing a new jsx function from a custom entry point. This change, which reduces the size of compiled code, requires updates to certain development tools, such as create-react-app, Next.js, and Gatsby.js, as well as adjustments to Babel configurations. Developers can utilize an automatic script, or codemod, provided by the React team to remove unnecessary imports, transforming references to hooks and functions into named imports, thereby streamlining the codebase and paving the way for future ES module builds of React. This enhancement aims to make React more accessible by reducing boilerplate code and improving the learning curve for new developers.