Post

This is your PSA that if you are a library that's already using Suspense and have tests related to that, you should try the React 19 RC.1 sooner rather than later. Nothing "broke" in runtime, but with the sibling prerendering change, React has gotten a lot more strict inside the `act` environment.

Most notable change: All code that triggers a suspense boundary needs to be wrapped in an awaited `act` call that receives an *async* callback. This also goes for render! There are open PRs in RTL, but you can also inline this for now.

github.comgithub.com

On the Apollo Client side, adjusting our tests to work with the React 19 RC 1, but also still run fine with React 18 and React 17 took about a week and a massive PR: github.com/apollographq... Test your stuff now before it becomes stressful later. This is the right time to try these RCs!

github.comRun tests with React 19 RC.1 and adjust tests accordingly by phryneas · Pull Request #12140 · apollographql/apollo-clientIf we are not in a render-streaming test replace render to renderAsync for suspense tests replace act with actAsync for suspense tests adjust in counting tests for additional sibling prerendering ...

1 repost1 like

No replies yet.