This is my slider right now my slider is giving me value [0,1,2] onChange, but I want to change these value to [0,2,1] how can I achieve that by default while I change the value it will start from 0,1,2
import React, { useState } from 'react'
import { Slider } from '@rneui/themed'
import { View, TouchableOpacity, Alert } from 'react-native'
const CustomSlider = ({ item, active }) => {
const [sliderValue, setSliderValue] = useState(1)
return (
<View>
<Slider
value={sliderValue}
onValueChange={(value) => setSliderValue(value)}
maximumValue={2}
minimumValue={0}
maximumTrackTintColor="red"
step={1}
minimumTrackTintColor="green"
trackStyle={{
height: 5,
borderRadius: 20,
backgroundColor: 'white',
}}
allowTouchTrack
thumbStyle={{
height: 17,
width: 17,
backgroundColor: 'black',
}}
/>
)}
</View>
)
}
export default CustomSlider