Skip to content

Commit 6c99f4b

Browse files
authored
Remove onChange callback references (#3631)
## Description In #3617 we've merged `onUpdate` and `onChange` callbacks so `onUpdate` now contains information about changes (or better to say, it will when we implement it 😄). However, there are still places in code where you can see `onChange` being referenced. This PR cleans that up. ## Test plan Tested on basic-example.
1 parent cc09760 commit 6c99f4b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/react-native-gesture-handler/src/v3/hooks/events/useGestureHandlerEvent.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export function useGestureHandlerEvent(
1313
shouldUseReanimated: boolean
1414
) {
1515
const handlers: CallbackHandlers = {
16-
onChange: config.onChange,
1716
onUpdate: config.onUpdate,
1817
};
1918

packages/react-native-gesture-handler/src/v3/hooks/utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export function getHandler(type: CALLBACK_TYPE, config: CallbackHandlers) {
1818
return config.onStart;
1919
case CALLBACK_TYPE.UPDATE:
2020
return config.onUpdate;
21-
case CALLBACK_TYPE.CHANGE:
22-
return config.onChange;
2321
case CALLBACK_TYPE.END:
2422
return config.onEnd;
2523
case CALLBACK_TYPE.FINALIZE:

packages/react-native-gesture-handler/src/v3/types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ export type TouchEvent =
3232
| GestureTouchEvent
3333
| NativeSyntheticEvent<GestureTouchEvent>;
3434

35+
// TODO: Replace with v3 specific types
3536
export type CallbackHandlers = Omit<
3637
HandlerCallbacks<Record<string, unknown>>,
37-
'gestureId' | 'handlerTag' | 'isWorklet'
38+
| 'gestureId'
39+
| 'handlerTag'
40+
| 'isWorklet'
41+
| 'changeEventCalculator'
42+
| 'onChange'
3843
>;

0 commit comments

Comments
 (0)