Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Heap, {
HeapIgnore,
HeapIgnoreTargetText,
} from '@heap/react-native-heap';
import { makeSentinelButton } from '../sentinelUtilities';
// Placeholder for identifying specific HeapIgnore'd subhierarchies.
const Foo = props => {
return props.children;
};
const TouchableOpacityWithHeapIgnore = Heap.withHeapIgnore(TouchableOpacity);
const TouchableOpacityWithHeapIgnoredTargetText = Heap.withHeapIgnore(
TouchableOpacity,
{
allowInteraction: true,
allowInnerHierarchy: true,
allowAllProps: true,
allowTargetText: false,
}
);
export default class HeapIgnorePage extends Component {
render() {
return (
import React, { Component } from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Heap, {
HeapIgnore,
HeapIgnoreTargetText,
} from '@heap/react-native-heap';
import { makeSentinelButton } from '../sentinelUtilities';
// Placeholder for identifying specific HeapIgnore'd subhierarchies.
const Foo = props => {
return props.children;
};
const TouchableOpacityWithHeapIgnore = Heap.withHeapIgnore(TouchableOpacity);
const TouchableOpacityWithHeapIgnoredTargetText = Heap.withHeapIgnore(
TouchableOpacity,
{
allowInteraction: true,
allowInnerHierarchy: true,
allowAllProps: true,
allowTargetText: false,
}
);
export default class HeapIgnorePage extends Component {
render() {
return (
value: state.value + action.amount,
};
case DECREMENT:
return {
...state,
value: state.value - action.amount,
};
}
return state;
};
// Store
export const store = createStore(
reducer,
applyMiddleware(Heap.reduxMiddleware)
);
componentDidMount() {
Heap.setAppId("2084764307");
console.log("Heap App ID set");
}
<button title="Call Track1"> Heap.track('pressInTestEvent1', {})}></button>
<button title="Call Track2"> Heap.track('pressInTestEvent2', {})}></button>
<button title="Call Track3"> Heap.track('pressInTestEvent3', {})}></button>
<button title="Call Track4"> Heap.track('pressInTestEvent4', {})}></button>
onPress={() => Heap.track('pressInTestEvent4', {})}
/>
<button title="Call Track2"> Heap.track('pressInTestEvent2', {})}></button>
<button title="Call Track3"> Heap.track('pressInTestEvent3', {})}></button>
onPress={() => Heap.track('pressInTestEvent2', {})}
/>
onPress={() => Heap.track('pressInTestEvent3', {})}
/>