@emotion/core doesn't handle React.Fragment shorthand correctly. #1549
Closed
Description
Current behavior:
Throws an error "React is not defined".
If React is imported then throws a warning "'React' is defined but never used."
To reproduce:
- Create an app with
create-react-app
- Create a component which uses
jsx
instead ofReact
. - Use
React.Fragment
shorthand as the container of that component. - Import the component and render it.
CodeSandbox: https://codesandbox.io/s/pensive-edison-bdkpp
Expected behavior:
It would be great if emotion
could handle the shorthand out of the box. If not, it should not at least warn me about React not being used.
Environment information:
react
version: 16.10.2@emotion/core
version: 10.0.21