Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
selection: () => {
if (Platform.OS !== "ios") {
return;
}
Haptic.selectionAsync();
},
impact: type => {
accessor: 'Haptics.ImpactFeedbackStyle.Light',
value: Haptics.ImpactFeedbackStyle.Light,
},
{
accessor: 'Haptics.ImpactFeedbackStyle.Medium',
value: Haptics.ImpactFeedbackStyle.Medium,
},
{
accessor: 'Haptics.ImpactFeedbackStyle.Heavy',
value: Haptics.ImpactFeedbackStyle.Heavy,
},
],
},
{
methodName: 'selectionAsync',
method: Haptics.selectionAsync,
data: [{}],
},
];
export default class HapticsScreen extends React.Component {
static navigationOptions = {
title: 'Haptics Feedback',
};
renderItem = ({
item,
section: { method },
}: {
item: { accessor: string; value: any };
section: { method: (type: string) => void };
}) =>