Skip to content

Commit 9203a10

Browse files
committed
Add deprecated tags
1 parent 9ef64d1 commit 9203a10

File tree

10 files changed

+43
-0
lines changed

10 files changed

+43
-0
lines changed

package/src/animation/spring/runSpring.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import { Spring } from "./Spring";
1010
import { createSpringEasing } from "./functions/spring";
1111

1212
/**
13+
* @deprecated Use Reanimated 3 for animations:
14+
* https://shopify.github.io/react-native-skia/docs/animations/animations
15+
*
1316
* Creates a new animation on an existing value that will be driven by
1417
* an animation value. The value will be run from / to the value in
1518
* params and modified by the provided easing curve for the length of

package/src/animation/spring/useSpring.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import { Spring } from "./Spring";
1010
import { createSpringEasing } from "./functions/spring";
1111

1212
/**
13+
* @deprecated Use Reanimated 3 for animations:
14+
* https://shopify.github.io/react-native-skia/docs/animations/animations
15+
*
1316
* Creats a spring based animation value that will run whenever
1417
* the animation parameters change.
1518
* @param toOrParams

package/src/animation/timing/runTiming.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import type {
88
import { getResolvedParams } from "./functions";
99
import { createTiming } from "./createTiming";
1010
/**
11+
* @deprecated Use Reanimated 3 for animations:
12+
* https://shopify.github.io/react-native-skia/docs/animations/animations
13+
*
1114
* Creates a new animation on an existing value that will be driven by
1215
* an animation value. The value will be run from / to the value in
1316
* params and modified by the provided easing curve for the length of

package/src/animation/timing/useLoop.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { TimingConfig } from "../types";
33
import { useTiming } from "./useTiming";
44

55
/**
6+
* @deprecated Use Reanimated 3 for animations:
7+
* https://shopify.github.io/react-native-skia/docs/animations/animations
8+
*
69
* Configures a looped timing value. The value will go back and forth
710
* between 0 and 1 and back.
811
* @param config Timing configuration for easing and duration

package/src/animation/timing/useTiming.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { getResolvedParams } from "./functions";
1212
import { createTiming } from "./createTiming";
1313

1414
/**
15+
* @deprecated Use Reanimated 3 for animations:
16+
* https://shopify.github.io/react-native-skia/docs/animations/animations
17+
*
1518
* Creats an animation value that will run whenever
1619
* the animation parameters change. The animation start immediately.
1720
* @param toOrParams

package/src/values/api.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,37 @@ Please use Reanimated instead: https://shopify.github.io/react-native-skia/docs/
2121
};
2222

2323
export const ValueApi = {
24+
/**
25+
* @deprecated Use Reanimated 3
26+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
27+
*/
2428
createValue<T>(initialValue: T): SkiaMutableValue<T> {
2529
deprecatedWarning();
2630
return SkiaValueApi.createValue(initialValue);
2731
},
32+
/**
33+
* @deprecated Use Reanimated 3
34+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
35+
*/
2836
createComputedValue<R>(
2937
cb: () => R,
3038
values: SkiaValue<unknown>[]
3139
): SkiaValue<R> {
3240
deprecatedWarning();
3341
return SkiaValueApi.createComputedValue(cb, values);
3442
},
43+
/**
44+
* @deprecated Use Reanimated 3
45+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
46+
*/
3547
createClockValue(): SkiaClockValue {
3648
deprecatedWarning();
3749
return SkiaValueApi.createClockValue();
3850
},
51+
/**
52+
* @deprecated Use Reanimated 3
53+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
54+
*/
3955
createAnimation<S extends AnimationState = AnimationState>(
4056
cb: (t: number, state: S | undefined) => S
4157
): SkiaAnimation {

package/src/values/hooks/useClockValue.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { useEffect, useMemo } from "react";
33
import { ValueApi } from "../api";
44

55
/**
6+
* @deprecated Use Reanimated 3
7+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
8+
*
69
* @returns A new value that will be updated on every frame redraw with the
710
* number of milliseconds elapsed since the value was started.
811
* The clock is created in the stopped state.

package/src/values/hooks/useComputedValue.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { ValueApi } from "../api";
44
import { isValue } from "../../renderer/processors/Animations";
55

66
/**
7+
* @deprecated Use Reanimated 3
8+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
9+
*
710
* Creates a new computed value - a value that will calculate its value depending
811
* on other values.
912
* @param cb Callback to calculate new value

package/src/values/hooks/useValue.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { ValueApi } from "../api";
44
import type { SkiaMutableValue } from "../types";
55

66
/**
7+
* @deprecated Use Reanimated 3
8+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
9+
*
710
* Creates a new value that holds some data.
811
* @param v Value to hold
912
* @returns A Value of type of v

package/src/values/hooks/useValueEffect.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { useEffect } from "react";
33
import type { SkiaValue } from "../types";
44

55
/**
6+
* @deprecated Use Reanimated 3
7+
* for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
8+
*
69
* Sets up an effect that will be run whenever the value changes
710
* @param value Value to subscribe to changes on
811
* @param cb Callback to run when value changes

0 commit comments

Comments
 (0)