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

Not working with React 19 #8

Closed
austinwilcox opened this issue Dec 20, 2024 · 5 comments
Closed

Not working with React 19 #8

austinwilcox opened this issue Dec 20, 2024 · 5 comments

Comments

@austinwilcox
Copy link

It appears that the plugin is no longer working after I upgraded a Vite/React project to React 19 and Vite 6. Is that expected behavior or am I potentially missing something else?

@ArnaudBarre
Copy link
Owner

This seems possible that this breaks with React 19, I didn't try it out yet. I look into it on Monday.
Do you have an up to date version of React devtools installed, the code path is different when it's installed: https://github.com/ArnaudBarre/vite-plugin-react-click-to-component/blob/main/src/client.ts#L178

@austinwilcox
Copy link
Author

I talked to the developer on my team having issues, and it looks it was a weird state with pnpm/Windows. He says it's all working just fine now. Thanks for the response. I'll go ahead and close the issue.

@ArnaudBarre
Copy link
Owner

So this is actually broken in React 19: facebook/react#28265
The solution is to use some code from facebook/react#28351
I'll try to work on that this week!

@ArnaudBarre ArnaudBarre reopened this Dec 23, 2024
@ArnaudBarre
Copy link
Owner

Took a bit longer (because of Factorio Space age ⚙️), but I've published v3.1.0 that do a hacky patch to get things working. I hope I'll get an answer from the React team on how to do it more cleanly in the future!

@nfarina
Copy link

nfarina commented Jan 13, 2025

Wonderful, I'm so happy to have this working again!!

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

No branches or pull requests

3 participants