4

In React Native, I found that componentDidUpdate() was being called over and over, so I tried to log prevProps for the first 20 iterations in order to get some insight into what might be changing. I used this code:

var flag = 0;
componentDidUpdate = async (prevProps) => {
  if (flag < 20) {
    console.log(prevProps);
    console.log(this.props);
  }
  flag++;
}

This does log prevProps and this.props for the first 20 iterations, but when I try to expand the objects in Chrome Devtools, they won't expand. See attached image: it shows the last four console.logs, and in the last two I clicked the lefthand arrow button to expand the object

enter image description here

Does anyone know why I can't expand these?

gkeenley
  • 2,920
  • 1
  • 18
  • 45
  • The debug bridge may be dead, or it may just take an excessively long time (like a minute) to expand once you click on the item – Kai Feb 06 '19 at 21:27
  • Possible duplicate of [Why can't I expand this event object in the chrome console?](https://stackoverflow.com/questions/18776467/why-cant-i-expand-this-event-object-in-the-chrome-console) – Mukeyii Feb 07 '19 at 09:15

0 Answers0