Skip to content

Commit 4e4ba15

Browse files
committed
Clarify
1 parent fb65d8c commit 4e4ba15

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ Now let's take a closer look at the differences between the old and the new tran
2828

2929
When you use JSX, the compiler transforms it into React function calls that the browser can understand. **The old JSX transform** turned JSX into `React.createElement(...)` calls.
3030

31-
For example,
31+
For example, let's say your source code looks like this:
3232

3333
```js
3434
import React from 'react';
3535

3636
function App() {
37-
return <h1>Hello World</h1>;
37+
return <h1>Hello World</h1>;
3838
}
3939
```
4040

41-
gets transformed to
41+
Under the hood, the old JSX transform turns it into regular JavaScript:
4242

4343
```js
4444
import React from 'react';
@@ -48,6 +48,10 @@ function App() {
4848
}
4949
```
5050

51+
>Note
52+
>
53+
>**Your source code doesn't need to change in any way.** We're describing how the JSX transform turns your JSX source code into the JavaScript code a browser can understand.
54+
5155
However, this is not perfect:
5256

5357
* Because JSX compiled into `React.createElement`, `React` needed to be in scope if you use JSX.

0 commit comments

Comments
 (0)