How can I view network requests (for debugging) in React Native?

Question!

I'd like to view my network requests in React Native to help me debug - ideally in the 'Network' tab of Chrome's devtools.

There are some closed issues about this on GitHub (https://github.com/facebook/react-native/issues/4122 and https://github.com/facebook/react-native/issues/934) but I don't entirely understand them. It sounds like I need to undo some of React Native's polyfills and then run some commands with extra debugging flags, and maybe modify some Chrome security settings? And apparently there are some security issues involved in doing this that might make it a terrible idea, but nobody involved in the thread has explicitly stated what they are.

Could somebody provide a step-by-step guide to getting the Network tab working with React Native, as well as an explanation of the security issues involved in doing so?



Answers

Add Debugger in the js where you can see the req or response

By : Pramod Mg


I suggest using Charles to inspect your network requests. It's really good and provide more visibility and allows you to do advanced stuff.

http://charlesproxy.com

By : Ran Yefet


This video can help you solving your question :)
By: admin