I can't get my animated view to change based on the state of the keyboard. Is there something that prevents animations like this? When I include something like the background color changing based on the keyboard, it works fine. Here's a mockup of what I've been working on.
const animKeyboard = useAnimatedKeyboard();
const determineFlex = (height:number) => {
'worklet'
return height > 0 ? 'flex-end' : 'center'
}
const animatedStyle = useAnimatedStyle(()=> {
return {
justifyContent: determineFlex(animKeyboard.height.value)
}
}
<Animated.View style={animatedStyle}>
...
</Animated.View>