UNPKG

@heap/react-native-heap

Version:

React Native event tracking with Heap.

10 lines (9 loc) 339 B
import { getBaseComponentProps } from './common'; export const autotrackSwitchChange = track => (eventType, componentThis, event) => { const autotrackProps = getBaseComponentProps(componentThis); if (!autotrackProps) { // We're not capturing this interaction. return; } track(eventType, autotrackProps); };