Skip to content

Commit 18c39b2

Browse files
authored
Fix TouchableNativeFeedback regression (#3294)
## Description #3260 introduced a regression to the `Gesture Handlers`'s `TouchableNativeFeedback` component. The component used to be a direct reference to the `TouchableNativeFeedback`, which has a [couple of static methods](https://reactnative.dev/docs/touchablenativefeedback#methods). When it was replaced with a function component, the static methods got removed, leaving only the render function of the `TouchableNativeFeedback`. ## Test plan See how the type errors in the `example/src/release_tests/touchables/index.tsx` are resolved.
1 parent 5752e01 commit 18c39b2

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
import React, { useEffect } from 'react';
21
import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native';
3-
import { tagMessage } from '../../utils';
42

53
/**
64
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
75
*/
8-
const TouchableNativeFeedback: React.FC<
9-
React.ComponentProps<typeof RNTouchableNativeFeedback>
10-
> = (props) => {
11-
useEffect(() => {
12-
console.warn(
13-
tagMessage(
14-
'TouchableOpacity component will be removed in the future version of Gesture Handler.'
15-
)
16-
);
17-
}, []);
18-
19-
return <RNTouchableNativeFeedback {...props} />;
20-
};
6+
const TouchableNativeFeedback = RNTouchableNativeFeedback;
217

228
export default TouchableNativeFeedback;

0 commit comments

Comments
 (0)