Search code examples
react-nativebuttonreact-native-gesture-handler

how to disable RectButton from react-native-gesture-handler


title is pretty much the question. On react-native buttons ie touchableOpacity you have the disabled prop but it doesn't appear to work on RectButton

<RectButton onPress={onPress} disabled={isDisabled}></RectButton>

doesn't work


Solution

  • There is a prop "enabled" use that.

    <RectButton onPress={onPress} enabled={!isDisabled}></RectButton>