Debugging ReactJs in Chrome on page load - this and everything else is undefined when using console

Viewed 991

I have a problem when debugging React on initial page load. As you can see from the screenshot, if I hover over this I can see the content but if I use console it says that this is undefined. This only happens when I reload the page, if I debug when clicking around this problem does not occur. I have React Developer Tools for Chrome installed and noted that when this is happening it only says Connecting to React…. Could this be the problem?

https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en

I'm using .tsx files (.jsx but with TypeScript) if that could matter.

Sources tab:

enter image description here

React tab:

enter image description here

1 Answers
Related