You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
Using CreateStyled and styled from @emotion/styled in my CRA Typescript project keep throw error: Error: Component selectors can only be used in conjunction with babel-plugin-emotion.
Code :
import styled, { CreateStyled } from '@emotion/styled'
import { Theme } from './index'
export default styled as CreateStyled<Theme>
Environment information:
react version: 16.12.0
emotion version: 10.0.27
Note: The styled will work if using standalone in a component
The text was updated successfully, but these errors were encountered:
This, unfortunately, doesn't work with pure TS in emotion 10. There are no plans to fix it because we have chosen other way of customizing the Theme type in the upcoming v11 (already available on npm and very much usable!): #1606 (comment)
I would recommend migrating to v11 if you are interested in this.
Current behavior:
Using
CreateStyled
andstyled
from@emotion/styled
in my CRA Typescript project keep throw error:Error: Component selectors can only be used in conjunction with babel-plugin-emotion.
Code :
Environment information:
react
version: 16.12.0emotion
version: 10.0.27Note: The
styled
will work if using standalone in a componentThe text was updated successfully, but these errors were encountered: