APSL / react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
MIT License
5.27k stars 646 forks source link

Fix warning due to calling getNode() #484

Closed slorber closed 3 years ago

slorber commented 3 years ago

Since RN 0.62, Animated components provide the real scrollview comp as ref, not the animated wrapper, and getNode() emits a deprecation warning:

ReactNativeFiberHostComponent: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.

This change ensures that this lib keeps working for older RN versions, without emitting a warning for newer versions.

@alvaromb I'm going to release this immediately as I still have publish access and it should be retrocompatible, just removing an annoying warning for users on recent RN versions.