DEV Community

Cover image for onPress on react native view component
Ravi Sharma
Ravi Sharma

Posted on

1

onPress on react native view component

Hey Everyone,

In react native Generally we are using touchable opacity or other touchable component and wrap the View component as Child then we set click event on View but no need to use additional Touchable component to make view clickable, instead of it you can use other props that i have described in this video. you can use other View props like:
onStartShouldSetResponder, onResponderRelease, onResponderGrant, onResponderMove or Pressable api of react native.

You can watch this video in which i have explained how to use all of them to set onPress on react native view component.

https://youtu.be/YMyzKr3hoII

If you are interested to learn react native, ReactJS, NodeJS then subscribe my channel "JavaScript Centric" where, daily I am uploading interesting videos on different topics.

Link:
https://www.youtube.com/c/JavaScriptCentric

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more