useAnimatedKeyboard frame delay results in choppy animation (iOS)
Description
When using the keyboard height from useAnimatedKeyboard to animate another component, there is a frame delay that results in a laggy animation. At full speed, it looks like the animated component is delayed. With slow animations enabled on the sim, you can see the choppiness/jitter (video below). I've included a min repro snack as well that demonstrates the issue on device.
https://user-images.githubusercontent.com/47671189/236428820-7b16d440-080b-4837-885d-ef1e6f0274e8.mov
Steps to reproduce
- Open linked snack on device (iOS) and toggle the keyboard several times by tapping the text input / tapping "return"
- Observe the pink bar that tracks the keyboard - you can see how it lags in both directions instead of following the keyboard frame for frame
Expected: Pink bar should track the keyboard smoothly (frame by frame)
Snack or a link to a repository
https://snack.expo.dev/@aazcarraga/reanimated-useanimatedkeyboard-frame-delay-repro?platform=ios
Reanimated version
3.1.0
React Native version
0.69.5
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone 14 Pro (iOS 16.4)
Acknowledgements
Yes
Probably got fixed since we merged: https://github.com/software-mansion/react-native-reanimated/pull/5337 I'll assign myself to remember to test it later
Probably got fixed since we merged: #5337 I'll assign myself to remember to test it later
This PR looks like only have android changes
But this issue is about iOS
I'm seeing this too. Are there any updates?
In the newest version of Reanimated it should works better