Skip to content

Commit a868d86

Browse files
committed
tweak wording
1 parent 7138aa0 commit a868d86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/blog/2020-09-22-introducing-the-new-jsx-transform.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,17 @@ However, this is not perfect:
5757
* Because JSX compiled into `React.createElement`, `React` needed to be in scope if you use JSX.
5858
* There are some [performance improvements and simplifications](https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation) that `React.createElement` does not allow.
5959

60-
To solve these issues, React 17 introduces two new entry points to the React package that are intended to only be used by compilers like Babel and TypeScript. Instead of transforming JSX to `React.createElement`, **the new JSX transform** automatically imports special functions from those new entry points in the React package and calls them. For example,
60+
To solve these issues, React 17 introduces two new entry points to the React package that are intended to only be used by compilers like Babel and TypeScript. Instead of transforming JSX to `React.createElement`, **the new JSX transform** automatically imports special functions from those new entry points in the React package and calls them.
61+
62+
Let's say that your source code looks like this:
6163

6264
```js
6365
function App() {
6466
return <h1>Hello World</h1>;
6567
}
6668
```
6769

68-
will now be transformed to
70+
This is what the new JSX transform compiles it to:
6971

7072
```js
7173
// Inserted by a compiler (don't import it yourself!)

0 commit comments

Comments
 (0)