Closed Crashtor closed 3 years ago
I'm trying to disable Draggable from a child <View>. However, it doesn't update on the fly.
<View>
<Draggable disabled={disabled.dis}> <View onTouchStart={() => updateDisabled() } ></View> </Draggable>
const updateDisabled = () => { disabled = {dis: disabled.dis == false ? true : false} }
Any suggestions as to how I can update on the fly?
Thanks
it worked with useState
useState
const [disabled, setDisabled] = useState(false)
<Draggable disabled={disabled}/>
<Pressable onPress={() => setDisabled(true)} />
I'm trying to disable Draggable from a child
<View>
. However, it doesn't update on the fly.Any suggestions as to how I can update on the fly?
Thanks