-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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-interactions] Add DO_NOT_USE to Scope methods #17835
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c3bde90:
|
Details of bundled changes.Comparing: f4ca909...c3bde90 react-native-renderer
react-reconciler
react-dom
react-art
react-test-renderer
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (stable) |
19b0a1e
to
c3bde90
Compare
Details of bundled changes.Comparing: f4ca909...c3bde90 react-test-renderer
react-native-renderer
react-art
react-dom
react-reconciler
Size changes (experimental) |
@@ -14,74 +14,11 @@ can be found [here](./docs). | |||
|
|||
Note: React Scopes require the internal React flag `enableScopeAPI`. | |||
|
|||
When creating a scope, a query function is required. The query function is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing this document as we really don't want people to be actively using any of these APIs right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds ok to me!
In attempt to make it clearer about existing experimental APIs and their internal usage. In the long term, the Scopes API is expected to change/go-away but for now, given it's internal usage we'll have to find incremental ways to safely migrate to better options. This PR is one small step of many in order to do that. This PR makes the following changes:
DO_NOT_USE
prefix to most Scope API methods that are potentially dangerous and will likely change or go away.getChildContextValues
that attempts to work with existing React Context. It find the nearest child context values for a given type and returns them as part of an array. The idea is to internally use this approach and gradually deprecate and remove the DO_NOT_USE APIs.