rn-vertical-slider
rn-vertical-slider copied to clipboard
crash when using reaniamted v3
Can you update the dependency?
I have created a patch file for supporting reanimated v3
diff --git a/node_modules/rn-vertical-slider/src/index.tsx b/node_modules/rn-vertical-slider/src/index.tsx
index f20ac03..c00fbad 100644
--- a/node_modules/rn-vertical-slider/src/index.tsx
+++ b/node_modules/rn-vertical-slider/src/index.tsx
@@ -87,7 +87,6 @@ const VerticalSlider: React.FC<SliderProps> = ({
// Helper Variables
const _moveStartValue = useSharedValue<number>(0);
const _value = useSharedValue<number>(currentValue);
- const value = new Animated.Value<number>(currentValue);
// Calculating Values from props.value
const calculateValues = () => {
@@ -126,7 +125,6 @@ const VerticalSlider: React.FC<SliderProps> = ({
const updateNewValue = (newValue: number) => {
let valueToUpdate = _clamp(newValue, min, max);
_value.value = valueToUpdate;
- value.setValue(valueToUpdate);
};
// PanResponder handlers
@@ -242,7 +240,7 @@ const VerticalSlider: React.FC<SliderProps> = ({
<Animated.Text
style={[styles.ballText, { color: ballIndicatorTextColor }]}
>
- {value}
+ {_value.value}
</Animated.Text>
)}
</Animated.View>
I can verify the patch works. Any idea if this will make it into a future version or are you concerned about dropping reanimated v2 support for the short term?