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

Support React 19 #622

Closed
Artur- opened this issue Dec 5, 2024 · 7 comments · Fixed by #624
Closed

Support React 19 #622

Artur- opened this issue Dec 5, 2024 · 7 comments · Fixed by #624

Comments

@Artur-
Copy link
Contributor

Artur- commented Dec 5, 2024

Describe the feature you'd love to see
React 19 was released today

@JoviDeCroock
Copy link
Member

This not remotely sufficient for an issue, this is pretty disrespectful. What issue are you seeing implying that we don't support v19

@Artur-
Copy link
Contributor Author

Artur- commented Dec 5, 2024

Mostly based on #580 (comment)

The statement is quite clear

@JoviDeCroock
Copy link
Member

So your complaint is that the peer range needs to be bumped... That could have been said 😅 honestly we do this in our free time as well, don't want to dwell on this but... yeah

@Artur-
Copy link
Contributor Author

Artur- commented Dec 5, 2024

I think we have a small misunderstanding here. There is no complaint, there is a request to provide support for React 19 in this project.

Based on quick testing it seems that installAutoSignalTracking does not work and this is the first thing pnpm run test fails on (in the browser it results in Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher'). There was a decision in an older issue not to support it for React 19. Maybe it should be completely removed?

After that, it seems that #580 is still valid with React 19.0.0 as the tests will spit out the same error

    Error: A React Element from an older version of React was rendered. This is not supported. It can happen if:

    - Multiple copies of the "react" package is used.

    - A library pre-bundled an old copy of "react" or "react/jsx-runtime".

@Artur-
Copy link
Contributor Author

Artur- commented Dec 5, 2024

Got something working with this, which should be compatible with React 18 also: Artur-@dc5ea89

@XantreDev
Copy link
Contributor

@JoviDeCroock
Copy link
Member

@Artur- I apologize if this comes across as a misunderstanding, from my point of view it wasn't. The issue is very low effort, we as maintainers are pretty swamped with work outside of our job, I recognise that this issue might have been well intended, however to me it did not come across that way.

The issue starts out with a blanket statement about "support react 19" without having done checks whether this is purely the peerDependency that needs to be bumped or whether there are aactual issues with the auto-runtime/transform/... when React 19 is involved.

#624 will take care of the fixes, thank you @XantreDev for doing the work in finding the traditional.element change - that saved me a ton of work! ❤️

Note that the automatic runtime is expected to not work due to a lot of changes in the internal-dispatcher. We knew this ahead of time and already added a guard and might remove the automatic runtime in the future.

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

Successfully merging a pull request may close this issue.

3 participants