TouchBlocker is a React Native and React Native Web component that helps blocking the user from interacting with children components.
npm install react-native-touch-blocker --save
or
yarn add react-native-touch-blocker
Test it online on Expo
<TouchBlocker>
<Button
title="Can't Touch This 😎"
onPress={() => null}
/>
</TouchBlocker>
Prop | Default | Type | Description |
---|---|---|---|
enableTouchEvents | false | Boolean | Allow children to receive touch events |
The TouchBlocker component also supports React Native View Props.