How to use @heap/react-native-heap - 10 common examples

To help you get started, we’ve selected a few @heap/react-native-heap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heap / react-native-heap / examples / TestDriver / src / pages / heapIgnore.js View on Github external
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 (
github heap / react-native-heap / examples / TestDriver / src / pages / heapIgnore.js View on Github external
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 (
github heap / react-native-heap / examples / TestDriver / src / reduxElements.js View on Github external
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)
);
github heap / react-native-heap / examples / TestDriver / src / mainScreen.js View on Github external
componentDidMount() {
    Heap.setAppId("2084764307");
    console.log("Heap App ID set");
  }
github heap / react-native-heap / examples / TestDriver / src / mainScreen.js View on Github external
        <button title="Call Track1"> Heap.track('pressInTestEvent1', {})}&gt;</button>
        <button title="Call Track2"> Heap.track('pressInTestEvent2', {})}&gt;</button>
github heap / react-native-heap / examples / TestDriver / src / mainScreen.js View on Github external
        <button title="Call Track3"> Heap.track('pressInTestEvent3', {})}&gt;</button>
        <button title="Call Track4"> Heap.track('pressInTestEvent4', {})}&gt;</button>
github heap / react-native-heap / examples / TestDriver / src / mainScreen.js View on Github external
        <button title="Call Track2"> Heap.track('pressInTestEvent2', {})}&gt;</button>
        <button title="Call Track3"> Heap.track('pressInTestEvent3', {})}&gt;</button>