A React Native and React Native Web component that allows you to enforce restrictions on which components children can interact with.
How to use it:
1. Install and import the react-native-touch-blocker component.
# Yarn $ yarn add react-native-touch-blocker # NPM $ npm i react-native-touch-blocker
2. Disable user interaction on a component.
<TouchBlocker> <Button title="Can't Touch This" onPress={() => null} /> </TouchBlocker>
3. Enable/disable user interaction.
<TouchBlocker enableTouchEvents={touchEnabled}> <Button title="Can't Touch This" onPress={() => null} /> </TouchBlocker>
Preview:
Download Details:
Author: youedd
Live Demo: View The Demo
Download Link: Download The Source Code
Official Website: https://github.com/youedd/react-native-touch-blocker
License: MIT