Issue
I have a React Native project and for some recent Chrome dev tools is giving me two different reads on a variable property when I expand it.
Why does position
property change when I expand the object in Chrome dev tools? It's not just a visual issue in dev tools, it also happens occurs in the code execution.
Solution
It changes because the code execution changes it!
When you click on expand, chrome will re-evaluate the current value of the object, and shows that. If, in between the initial log and your expansion, the object gets changed by your code, chrome is going to show that change.
Answered By - Michiel Dral
Answer Checked By - - Candace Johnson (ReactFix Volunteer)