Skip to content
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

[feat]: Add support for react 19 #5906

Open
2 tasks done
RicardoGEsteves opened this issue Nov 22, 2024 · 10 comments
Open
2 tasks done

[feat]: Add support for react 19 #5906

RicardoGEsteves opened this issue Nov 22, 2024 · 10 comments

Comments

@RicardoGEsteves
Copy link

Feature description

Is there any timeframe or plan to migrate components to react 19?

Affected component/components

Most if not all

Additional Context

The use of forwardRef on same/most components for example is forcing the need to implement some change on the component definition and integration.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
@sbeckerdev
Copy link

sbeckerdev commented Nov 23, 2024

I had to abandon a Next JS 15 because this lib is not compatible with React 19 and then switched to Remix and dark mode is broken. I really hope they solve the issues.

@eriknyk
Copy link

eriknyk commented Nov 23, 2024

@sbeckerdev dark mode works perfectly on Remix for me, what problem do you have?

@sbeckerdev
Copy link

sbeckerdev commented Nov 23, 2024

The root layout is different in the last version. I followed the guide and it looks like the dark class is not applied when pressing the toggle. Can you share an example?

@zuher83
Copy link

zuher83 commented Nov 30, 2024

@sbeckerdev I don't understand the problem. Next.js15 with React.js19 works perfectly for me! Look, I even made a Starter Kit, and from that, I created a project that should be in production within a month.
https://github.com/zuher83/Nextjs-15-Z-Starter-Kit

@Kiranism
Copy link

Kiranism commented Dec 1, 2024

@sbeckerdev I don't understand the problem. Next.js15 with React.js19 works perfectly for me!

Hey @zuher83 , I see you are using React 19, and the ShadCN components are still using the deprecated forwardRef. How do you manage to avoid this error?

@zuher83
Copy link

zuher83 commented Dec 1, 2024

Hey @Kiranism Good question! Even though forwardRef is deprecated in React 19, ShadCN components still work fine because React maintains backward compatibility.

@Kiranism
Copy link

Kiranism commented Dec 1, 2024

Hey @Kiranism Good question! Even though forwardRef is deprecated in React 19, ShadCN components still work fine because React maintains backward compatibility.

Got it, but I'm still getting that error in the modal. :)

@rafadlis
Copy link

Hey @Kiranism Good question! Even though forwardRef is deprecated in React 19, ShadCN components still work fine because React maintains backward compatibility.

Got it, but I'm still getting that error in the modal. :)

I got the same error, it is about lint or eslint. you can disable it

@waldaara
Copy link

any updates?

@RicardoGEsteves
Copy link
Author

You will have to updated it yourself at least was what I did, forget forwardRef and ElementRef, and use instead ComponentPropsWithRef that way you will access ref passed by props.

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

7 participants