@heap/react-native-heap
Version:
React Native event tracking with Heap.
12 lines (11 loc) • 552 B
JavaScript
class DisplayNameTest {
render() { }
}
let warningGiven = false;
export const checkDisplayNamePlugin = () => {
// @ts-ignore
if (!DisplayNameTest.displayName && !warningGiven) {
console.warn('Heap: Display names are not being generated for React components, which will cause Heap to populate captured component hierarchies with dummy component names. Make sure the "add-react-displayname" plugin is specified in your babel config, and that the config is being properly picked up by the app.');
warningGiven = true;
}
};