generated at
withTiming


ts
value = withTiming(toValue, config?, callback?)

CSS: transform的なやつ
shared valueをanimationを伴って更新する

第3引数のcallbackは、アニメーション終了時に実行する処理を書く
成功時は引数が true になる

ts
const offset = useSharedValue(width / 2 - 160); useEffect(() => { offset.value = withTiming(-offset.value, { duration: 1000 }); }, []);
useStateで言うと、 setState(v => -v) の様な更新を1秒かけて起こしている感じ