Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upMigrate off of old context APIs #28103
Comments
This comment has been minimized.
This comment has been minimized.
I'd love to help out! Could I work on |
This comment has been minimized.
This comment has been minimized.
I would love to take care of |
This comment has been minimized.
This comment has been minimized.
hey there, I can check virtualizedlist |
Summary: 1/4 of #28103 ## Changelog [JavaScript][Removed] - Remove leftover `Incremental` component. Pull Request resolved: #28107 Test Plan: In RNTester `Incremental` component is no longer used so I modified one of existing examples to use it. Reviewed By: rickhanlonii Differential Revision: D19960536 Pulled By: TheSavior fbshipit-source-id: 791bda7138ac23916957577ed5f5c465c5e96299
This comment has been minimized.
This comment has been minimized.
@Naturalclar @mikaoelitiana they're all yours to take :) |
This comment has been minimized.
This comment has been minimized.
@thymikee thanks, I am already working on |
This comment has been minimized.
This comment has been minimized.
It looks like Modal actually only uses the VirtualizedList Context and AppContainer Context, it doesn't have its own context. So we need to get the VirtualizedList and AppContainer ones done first. |
This comment has been minimized.
This comment has been minimized.
So this means these contexts need to be exported, right? |
This comment has been minimized.
This comment has been minimized.
Yeah, the root tag context is already exported, unstable_RootTagContext, the VirtualizedList one can be exported as a static property on VirtualizedList: VirtualizedList.Context |
This comment has been minimized.
This comment has been minimized.
@TheSavior is the VirtualizedList context used internally at FB? It looks like Modal overwrites the |
This comment has been minimized.
This comment has been minimized.
Yeah, these contexts are all used fairly heavily. Any kind of portal type thing would use it like Modal or BottomSheet. |
Summary: 1/4 of facebook#28103 ## Changelog [JavaScript][Removed] - Remove leftover `Incremental` component. Pull Request resolved: facebook#28107 Test Plan: In RNTester `Incremental` component is no longer used so I modified one of existing examples to use it. Reviewed By: rickhanlonii Differential Revision: D19960536 Pulled By: TheSavior fbshipit-source-id: 791bda7138ac23916957577ed5f5c465c5e96299
This comment has been minimized.
This comment has been minimized.
It appears all of the tasks on this issue have been claimed? Looking for my first RN issue to help out on :) |
We want to get rid of our usage of the
prop-types
package. The last remaining usage of this is a couple of old components that use the old React context API. We need to migrate these components to use the modernReact.createContext
API.The components using the old context API are:
Incremental (@venits)For more information about the old API and how to migrate to the new API you can check out the React docs for Context: https://reactjs.org/docs/context.html#classcontexttype
If we are able to remove the usage of prop-types from React Native we should be able to substantially lower the bundle size of React Native. We'd love your help!