Skip to content

Commit 410cc90

Browse files
committed
Rename callbacks
1 parent 05e7327 commit 410cc90

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/react-native-gesture-handler/src/v3/components/GestureButtons.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const BaseButton = (props: BaseButtonProps) => {
4242
}
4343
};
4444

45-
const onStart = (e: CallbackEventType) => {
45+
const onActivate = (e: CallbackEventType) => {
4646
onActiveStateChange?.(true);
4747

4848
if (Platform.OS !== 'android' && e.pointerInside) {
@@ -58,7 +58,7 @@ export const BaseButton = (props: BaseButtonProps) => {
5858
}
5959
};
6060

61-
const onEnd = (e: CallbackEventType, success: boolean) => {
61+
const onDeactivate = (e: CallbackEventType, success: boolean) => {
6262
onActiveStateChange?.(false);
6363

6464
if (success && !longPressDetected.current) {
@@ -78,8 +78,8 @@ export const BaseButton = (props: BaseButtonProps) => {
7878
style={[style, Platform.OS === 'ios' && { cursor: undefined }]}
7979
{...rest}
8080
onBegin={onBegin}
81-
onStart={onStart}
82-
onEnd={onEnd}
81+
onActivate={onActivate}
82+
onDeactivate={onDeactivate}
8383
onFinalize={onFinalize}
8484
/>
8585
);

0 commit comments

Comments
 (0)