Skip to content

Conversation

@msmps
Copy link
Contributor

@msmps msmps commented May 27, 2025

I spent some time over the weekend working on adding support for React 19. I’ve successfully got it working, but opted to stick with the legacy rendering mode rather than enabling concurrent mode for now.

This means that React will continue to render updates synchronously, maintaining the existing behaviour.

At this point, all tests are passing.

Additionally, the types provided by DefinitelyTyped are not yet up to date with the latest version of the React reconciler, so I’ve added a few @ts-expect-error comments to work around that for the time being.

I’ve published a testing version of this fork as:

Concurrent Mode

I did experiment with enabling concurrent mode and got it working, but the test suite revealed several issues:

  • Many tests fail unless wrapped in act() and converted to async.
  • There are frequent warnings about state updates occurring outside of act().
  • It looked like unmount() is/was firing multiple times, potentially causing these warnings.

It felt like concurrent mode would require a more involved refactor. I’d suggest we consider this as a fast follow-up once React 19 legacy support is merged.

I’ve pushed a separate branch with the concurrent mode changes if anyone wants to explore or contribute to that effort.

Addresses: #688 #656

@msmps msmps mentioned this pull request May 27, 2025
@msmps msmps marked this pull request as ready for review May 28, 2025 17:41
@sindresorhus sindresorhus merged commit b9e9466 into vadimdemedes:master May 29, 2025
2 checks passed
@sindresorhus
Copy link
Collaborator

@msmps Thanks for doing the work on this 🙏

@sindresorhus
Copy link
Collaborator

Moved concurrent discussion here: #720

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 this pull request may close these issues.

2 participants