![]() |
VOOZH | about |
React onTouchCancel event fires when touch interrupts. Similar to other elements in it, we have to pass a function for process execution.
It is similar to the HTML DOM touchcancel event but uses the camelCase convention in React.
Syntax:
onTouchCancel={function}Parameter :
Return type:
Example 1 : In this example, we implemented the TouchCancel area. If the user interrupts their touch inside the area, they will get a message on the console through the function.
Output :
Example 2 : In this example, we implemented an area where when user interrupts there touch user will get a alert message that TouchCancel Fired.
Output: