From a868d860cd24cea3315764b272c070ce01258164 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 23 Sep 2020 13:17:33 +0100 Subject: [PATCH] tweak wording --- .../blog/2020-09-22-introducing-the-new-jsx-transform.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md index cb12f12c..d639a19c 100644 --- a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md +++ b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md @@ -57,7 +57,9 @@ However, this is not perfect: * Because JSX compiled into `React.createElement`, `React` needed to be in scope if you use JSX. * 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. -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, +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. + +Let's say that your source code looks like this: ```js function App() { @@ -65,7 +67,7 @@ function App() { } ``` -will now be transformed to +This is what the new JSX transform compiles it to: ```js // Inserted by a compiler (don't import it yourself!)