React Native - Why Did You Update [Maximum Stack Size Exceeded]

Viewed 430

I am trying to use Why-Did-You-Update with React Native to analyze where my app is re-rendering when there's no need to. I use the Android Emulator to test my app.

I have this code in App.js

if (DEBUG) {
    let createClass = React.createClass;
    Object.defineProperty(React, 'createClass', {
        set: (nextCreateClass) => {
            createClass = nextCreateClass;
        }
    });
    const {whyDidYouUpdate} = require('rn-why-did-you-update');
    whyDidYouUpdate(React, { include: /^./, exclude: /^YellowBox/ });
}

Maximum Stack Size Exceeded

enter image description here

I have understood (from other sites) that the recursivity from the package is broken, (infinite looping) but I can't understand why it's happening in React Native, as it seems to be working with React.

Thanks.

0 Answers
Related