Convert KeyboardAvoidingView to function component#57102
Conversation
|
Hi @ahmdshrif! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
d4809be to
74a4bef
Compare
Follows the same migration as ImageBackground (facebook#56355), RefreshControl (facebook#56354) and Modal (facebook#56348). As with ImageBackground, a ref on <KeyboardAvoidingView> now forwards to the underlying View (exposing measure, setNativeProps, ...) instead of the class instance; KeyboardAvoidingViewInstance is re-typed to the View ref accordingly.
74a4bef to
350fb74
Compare
|
@fabriziocucci has imported this pull request. If you are a Meta employee, you can view this in D107854206. |
Summary:
Converts
KeyboardAvoidingViewfrom a class component to a function component, matching the recent conversions ofImageBackground(#56355),RefreshControl(#56354) andModal(#56348).Because the component is no longer a class, a
refon<KeyboardAvoidingView>now forwards to the underlyingView(so it exposes theViewmethods likemeasure,setNativeProps, …) instead of resolving to theKeyboardAvoidingViewclass instance.KeyboardAvoidingViewInstanceis re-typed to theViewref accordingly.Changelog:
[GENERAL] [CHANGED] - Convert
KeyboardAvoidingViewto function componentTest Plan:
yarn flowandyarn jest packages/react-native/Libraries/Components/Keyboardpass.