Closed m-bert closed 4 months ago
This PR changes argument passed into onPress callback in our Buttons. Previous one was always false because of this code:
onPress
false
const active = pointerInside && state === State.ACTIVE; ... if ( ... oldState === State.ACTIVE && ... ) { this.props.onPress(active); }
callback was executed when state was END, so active was false at this point.
state
END
active
Description
This PR changes argument passed into
onPress
callback in our Buttons. Previous one was alwaysfalse
because of this code:callback was executed when
state
wasEND
, soactive
wasfalse
at this point.Test plan
Test code
```tsx import React from 'react'; import { StyleSheet, View } from 'react-native'; import { RectButton } from 'react-native-gesture-handler'; export default function EmptyExample() { return (