software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

[Web] Remove `collapsable` property #3203

Closed m-bert closed 1 week ago

m-bert commented 1 week ago

Description

Currently when we add component into GestureDetector, we add collapsable={false} to its props. However, it does nothing on web, so we can safely remove it. This way we can get rid of the following error:

Warning: Received `false` for a non-boolean attribute `collapsable`.

Closes #3201

Test plan

Tested on the following code: ```jsx import { GestureHandlerRootView, GestureDetector, Gesture, } from 'react-native-gesture-handler'; import { View } from 'react-native'; import { Svg, Circle } from 'react-native-svg'; import { useState, useCallback } from 'react'; export default function App() { const [circleFill, setCircleFill] = useState('blue'); const switchCircleColor = useCallback( () => setCircleFill((old) => (old === 'blue' ? 'brown' : 'blue')), [setCircleFill] ); const tapGestureCircle = Gesture.Tap().runOnJS(true).onEnd(switchCircleColor); return ( ); } ```