After setting up a project following the React Native Quick Start guide, and doing yarn eject
, I added Stetho to the project, following the debugging guide.
I added a button in the example app with the following onPress
method:
test () {
fetch('https://google.com')
.then(() => {alert('ok')}, () => {alert('fail')});
}
When running the app, in Chrome Device Inspector I can see the project "(powered by Stetho)", but in the Network tab there is no request logged, when I press the button.
OS: Fedora (but tried on OSX too)
Device: emulated Pixel with API 26
react-native version: 0.49
Stetho version: 1.5.0
What am I missing?
Note: I am aware of this hack, but I would like to use Stetho instead, as I do not want to restart Chrome in insecure mode to allow CORS requests.