fix(react-urql): Upgrade muted warning code for React 19 internals #3769
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3764
Summary
Same as before: the warning is irrelevant, and we're looking to mute it. We can make the deferred dispatching permanent, if we don't want to rely on internals, but this PR currently keeps it the same and just updates how we access internals.
These lines show how this internal has changed: https://github.com/facebook/react/blob/b286430c8a585dc2e2e3cc023e7c455ec2b34ab7/packages/react/src/jsx/ReactJSXElement.js#L52-L61
As before, just because the warning is issued that doesn't mean anything is wrong. We're only doing this to mute this warning.
Warning
I haven't tested this yet, at all, but it should work fine.
Set of changes
ReactCurrentOwner
is accessed using new internals