Skip to content

Commit 93b3ab9

Browse files
authored
Add a note for library authors to JSX blog post (#3339)
* Add a note for library authors to JSX blog post * Update 2020-09-22-introducing-the-new-jsx-transform.md
1 parent d78b121 commit 93b3ab9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ Starting from Babel 8, `"automatic"` will be the default runtime for both plugin
172172
> Note
173173
>
174174
> If you use JSX with a library other than React, you can use [the `importSource` option](https://babeljs.io/docs/en/babel-preset-react#importsource) to import from that library instead -- as long as it provides the necessary entry points. Alternatively, you can keep using the classic transform which will continue to be supported.
175+
>
176+
> If you're a library author and you are implementing the `/jsx-runtime` entry point for your library, keep in mind that [there is a case](https://github.com/facebook/react/issues/20031#issuecomment-710346866) in which even the new transform has to fall back to `createElement` for backwards compatibility. In that case, it will auto-import `createElement` directly from the *root* entry point specified by `importSource`.
175177
176178
### ESLint {#eslint}
177179

0 commit comments

Comments
 (0)