Closed alexey-yarmosh closed 4 months ago
Probably I am missing something, but how to update current value from the outside? (e.g. if value comes from props). Updating progress.value doesn't have any effect.
progress.value
import { useSharedValue } from 'react-native-reanimated'; import { Slider } from 'react-native-awesome-slider'; export const Slider = ({ value, onChange, }: { value: number; onChange: Function; }) => { const theme = useTheme(); const progress = useSharedValue(value); const min = useSharedValue(0); const max = useSharedValue(10); useEffect(() => { progress.value = value; }, [value]); return ( <Slider style={styles.container} progress={progress} minimumValue={min} maximumValue={max} /> ); };
hey @alexey-yarmosh, you can check this.
Probably I am missing something, but how to update current value from the outside? (e.g. if value comes from props). Updating
progress.value
doesn't have any effect.