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

React 19 support #8

Open
kossnocorp opened this issue Dec 9, 2024 · 3 comments
Open

React 19 support #8

kossnocorp opened this issue Dec 9, 2024 · 3 comments

Comments

@kossnocorp
Copy link

Hey! Thank you so much for this helpful library 🙏

There's a small problem, though. After upgrading to React 19, released a few days ago, it started breaking as it locks on React 18. I tested it on my project with React 19 by copying the source of vitest-browser-react code into my repo, as there's no need for any changes. It just works. I think you can safely expand the dependency version to include 19 and ship it as a new version.

@sheremet-va
Copy link
Member

Shouldn't "react": ">18.0.0" cover react 19?

@MatanBobi
Copy link
Contributor

I agree with @sheremet-va here, we have `"react": ">18.0.0" which allows these versions (taken from semver.npmjs.com):
image

@xeger
Copy link

xeger commented Dec 29, 2024

Confirming that I can use this pkg with React 19; see xeger/locatorium#1 for proof.

On my initial attempt, I experienced an odd error about react-dom/client lacking a default export, or not exporting something. I created the project with React 18, which fixed the issue, and later I upgraded to React 19; the issue did not occur.

I've encountered this error intermittently in the past, not always with React 19. I haven't bothered to investigate, as I'm not sure whether it's a legitimate issue with a package or some issue with transpiler/bundler configuration. I have only seen it happen when using npm as a package manager, never with pnpm.

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

4 participants