What is @babel/plugin-syntax-jsx?
The @babel/plugin-syntax-jsx npm package allows Babel to parse JSX syntax. JSX is a syntax extension for JavaScript, commonly used with React to describe what the UI should look like. By enabling this plugin, Babel can understand and process JSX syntax, but it does not transform it. To transform JSX, you would need to use another plugin like @babel/plugin-transform-react-jsx.
JSX Parsing
This plugin allows Babel to parse JSX syntax like the one in the code sample, which represents a React element.
const element = <div>Hello, world!</div>;