DEV Community

Discussion on: Migrating to React 17 and Fixing the JSX Runtime Error with Emotion

Collapse
 
troelsagergaard profile image
Troels Agergaard • Edited

@emotion/core package has been renamed to @emotion/react

If you are using a zero-config tool with automatic detection of which runtime (classic vs. automatic) should be used and you are already using a React version that has the new JSX runtimes (hence runtime: 'automatic' being configured automatically for you) such as Create React App 4 then /** @jsx jsx / pragma might not work and you should use /* @jsxImportSource @emotion/react */ instead.

Source: emotion.sh/docs/css-prop