File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## 🛠 Network debug tool for react-native
2
+
3
+ ![ react-native-network-proxy] ( http://i.imgur.com/kNtLzUr.jpg )
4
+
5
+ Ever struggled with debugging network requests in React Native? Prefer console tools instead of GUI solutions (like [ reactotron] ( https://github.com/infinitered/reactotron ) )?
6
+
7
+ ## Getting started
8
+
9
+ - Install ` react-native-network-proxy ` by running
10
+
11
+ ``` bash
12
+ $ yarn add react-native-network-proxy
13
+ ```
14
+ or
15
+ ``` bash
16
+ $ npm i react-native-netowrk-proxy --save
17
+ ```
18
+
19
+ - Add ` react-native-network-proxy ` to your react-native application:
20
+
21
+ ``` js
22
+ import { start as startNetworkDebugging } from ' react-native-network-proxy' ;
23
+
24
+ startNetworkDebugging ({
25
+ host: ' localhost' ,
26
+ port: 6969 ,
27
+ });
28
+
29
+ // or just startNetworkDebugging();
30
+ ```
31
+
32
+ - Start ` react-native-network-proxy ` server:
33
+
34
+ ``` bash
35
+ $ yarn react-native-network-proxy
36
+ ```
37
+ or
38
+ ``` bash
39
+ $ npm run react-native-network-proxy
40
+ ```
41
+
42
+ - That's it! Run your app and make your ` fetch ` /` XMLHttpRequest ` ! The request should appear in the console where the server is running
43
+
44
+ ## Help
45
+
46
+ You can always reach me on [ twitter (@kureevalexey )] ( https://twitter.com/@kureevalexey )
You can’t perform that action at this time.
0 commit comments