-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using @emotion/styled with preact and typescript #1331
Comments
Running into the same issue, and I also have the same question about |
Based on #896 the prospects here look bleak. |
Thanks @birtles for digging that one out, since there still was no other "official" statement. Here the excerpt for people reading this later:
@mitchellhamilton in #896 you added a ToDo list wich states |
emotion
version: 10.0.9@emotion/styled
version: 10.0.10preact
version: 8.4.2typescript
version: 3.4.5Relevant code:
What you did:
Tried to use
@emotion/styled
in apreact
projectWhat happened:
JSX element type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)>' is not a constructor function for JSX elements. Type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)>) | (new (props: any) => Component<any, any, any>)>' is missing the following properties from type 'Element': nodeName, attributes, childrents(2605)
Problem description:
It seems like the old package
preact-emotion
silently disappeared with version 10.0.0 of emotion and the new version of@emotion/styled
is based uponreact
as peerDependency.The types for
@emotion/styled
are extending the following Interface from@types/react
via@emotion/styled-base
:Are there any plans/chances to get rid of the direct
react
dependency here in order to use thestyled
API e.g. withpreact
?The text was updated successfully, but these errors were encountered: