InterviewHubPRO
Section Overview
Q234

Question 234 of 445

Part 8: Advanced React Patterns, Portals & Performance (152 - 261)

53%
React & Modern Frontend (445 Qs)•Part 8: Advanced React Patterns, Portals & Performance (152 - 261)

What are the benefits of new JSX transform?

There are three major benefits of new JSX transform,

  1. It is possible to use JSX without importing React packages
  2. The compiled output might improve the bundle size in a small amount
  3. The future improvements provides the flexibility to reduce the number of concepts to learn React.

Practical Code Example

jsx
// New JSX Transform (React 17+):
// Automatically imports JSX runtime functions; no need to write 'import React from "react"'!
function Heading() {
  return <h1>No React import needed!</h1>;
}