3 ms·
You'll be able to tell babel to use a different "importSource" instead of `React`: https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#importsource htt
by henryfjordan 6y ago
You'll be able to tell babel to use a different "importSource" instead of `React`:
https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#importsource https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#...
- lucideer 6y ago`importSource` is just a newer version of `pragma` (I mentioned above, listed on that page below `importSource`), and works fine right now without this new transform.
- henryfjordan 6y agoI was responding to this statement: > The change described in the article makes it unnecessary to import the full React lib into each component file _when using JSX with React_. `importSource` is more than just the new `pragma`, it also handles the fancy auto-import magic. This change makes it unnecessary to import your own custom lib (not just React) into each JSX file.
- lucideer 6y agoAh ok, I get your meaning now. Yeah, it saves the need for the line in source code, but doesn't affect the generated code either way (you still need to include React somehow if using it, or whatever alternative if not)