How to use the @heap/react-native-heap.withHeapIgnore function in @heap/react-native-heap

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 (