Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Add a note for library authors to JSX blog post (#3339)
Browse files Browse the repository at this point in the history
* Add a note for library authors to JSX blog post

* Update 2020-09-22-introducing-the-new-jsx-transform.md
  • Loading branch information
gaearon committed Oct 17, 2020
1 parent d78b121 commit 93b3ab9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/blog/2020-09-22-introducing-the-new-jsx-transform.md
Expand Up @@ -172,6 +172,8 @@ Starting from Babel 8, `"automatic"` will be the default runtime for both plugin
> Note
>
> 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.
>
> 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`.
### ESLint {#eslint}

Expand Down

0 comments on commit 93b3ab9

Please sign in to comment.