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 has updated this SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED #12017

Open
FlevianK opened this issue Aug 22, 2024 · 2 comments
Open
Labels
ℹ needs-more-info Needs more information to determine root cause

Comments

@FlevianK
Copy link

Issue Description

We are preparing for react 19 usage but we are block because of this

?.ReactCurrentOwner?.current?.elementType;

Which is clearly stated here https://react.dev/blog/2024/04/25/react-19-upgrade-guide#libraries-depending-on-react-internals-may-block-upgrades

Are we expecting the update soon?

Link to Reproduction

https://codesandbox.io/p/devbox/frosty-water-mgxmx4?file=%2Fpackage.json%3A6%2C20

Reproduction Steps

Using react 19

@apollo/client version

3.11.4

@jerelmiller
Copy link
Member

Hey @FlevianK 👋

These are our internal testing utilities that we use for our Apollo Client React tests. Unless you're using these directly, then that internal variable usage shouldn't matter. This code is not bundled with the core library.

I'm able to run the reproduction you created with React 19 just fine and see no errors anywhere. Can you explain more in detail what you're blocked by here?

@jerelmiller jerelmiller added the ℹ needs-more-info Needs more information to determine root cause label Aug 22, 2024
@phryneas
Copy link
Member

phryneas commented Aug 23, 2024

Normal usage of Apollo Client should not cause any problems with SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED since v3.10.1 (via #11803), which we released back in April.

Any traces of it beyond that in user-facing code have been removed with v3.10.5 (via #11888) in June.

All that's left is our internal usage, and as long as your userland code doesnt import from "@apollo/client/testing/internal" (please don't! the internal in the name is there for a reason), you should not be facing any problems.

Did you maybe try this out with an older version of Apollo Client initially?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ℹ needs-more-info Needs more information to determine root cause
Projects
None yet
Development

No branches or pull requests

3 participants