Skip to content

facing type error on upgrading react version from 17 -> 18 #3321

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

Open
tushar27042 opened this issue Mar 26, 2025 · 5 comments
Open

facing type error on upgrading react version from 17 -> 18 #3321

tushar27042 opened this issue Mar 26, 2025 · 5 comments

Comments

@tushar27042
Copy link

Facing this issue only when upgrading the react version from 17 to 18.

Current behavior:

css="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)."

Image
  1. import { jsx /* css */ } from "@emotion/react";
  2. export const railnavMenuWrapper = css <some css & rules> ``
  3. <div css={railnavMenuWrapper}></div>

Expected behavior:

Should work smoothly without throwing any error or breaking the css.

Environment information:

  • react version: 18.3.1
  • @emotion/react version: 11.8.
  • node-version: 22.14.0
@Andarist
Copy link
Member

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

@tushar27042
Copy link
Author

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

https://codesandbox.io/p/devbox/lucid-parm-5m8mr6?workspaceId=ws_4DYs3er3KcBeau18DJQWPj

Image

@RohitRonghe
Copy link

@Andarist do we have an update on this?

CC: @tushar27042

@tushar27042
Copy link
Author

@Andarist Do we have an update on this ? I’m currently blocked because of it and need to proceed with my work. Let me know if any further details are required from my end. Thanks!

cc: @RohitRonghe

@tushar27042
Copy link
Author

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

any update on the above issue?
cc: @RohitRonghe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants