Switch to react-native default animation tools for composer and post controls
This commit is contained in:
parent
ae522c86fe
commit
79d5708b69
4 changed files with 103 additions and 59 deletions
12
src/view/lib/useAnimatedValue.ts
Normal file
12
src/view/lib/useAnimatedValue.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import * as React from 'react'
|
||||
import {Animated} from 'react-native'
|
||||
|
||||
export function useAnimatedValue(initialValue: number) {
|
||||
const lazyRef = React.useRef<Animated.Value>()
|
||||
|
||||
if (lazyRef.current === undefined) {
|
||||
lazyRef.current = new Animated.Value(initialValue)
|
||||
}
|
||||
|
||||
return lazyRef.current as Animated.Value
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue