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
<div><divcss="[object Object]">Hello!</div><divcss="You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."
>
Hello!
</div><divcss="You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."
>
Hello!
</div></div>
Thanks @Andarist and @srmagura , It would be nice if CRA could respect jsxImportSource in tsconfig. It's a bit annoying to have to remember to add this comment on each new file.
I guess I could alternatively use react-app-rewired to setup the emotion babel plugin.
Current behavior:
I followed the Typescript instructions to add emotion to a fresh create-react-app project: testerez/cra-ts-emotion@086cc35
But when I try to use css prop in any way:
Here is the result I get:
Did I miss something?
To reproduce:
npm i && npm run start
Expected behavior:
I would expect the
css
prop to work with this setup.Environment information:
react
version:18.1.0
@emotion/react
version:11.9.0
The text was updated successfully, but these errors were encountered: