Skip to content

Commit 2993642

Browse files
committed
Adding basic configuration section
1 parent 39e51e8 commit 2993642

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

configuration.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
11
# Configuration
22

3-
TODO: Document all the good stuff about configuration here
3+
When calling Reacotrons `configure` method you can pass options.
4+
5+
```javascript
6+
import Reactotron from 'reactotron-react-native' // or 'reactotron-react-js'
7+
8+
Reactotron.configure({
9+
createStocket: () => {}, // TODO: Document
10+
host: '10.0.0.1', // TODO: Document
11+
port: 9090, // TODO: Document
12+
name: 'My Awesome App', // TODO: Document
13+
secure: true, // TODO: Document. Do we need to?
14+
onCommand: () => {}, // TODO: Document
15+
onConnect: () => {}, // TODO: Document
16+
onDisconnect: () => {}, // TODO: Document
17+
setClientId: () => {}, // TODO: Document
18+
getClientId: () => {}, // TODO: Document
19+
})
20+
```
21+
22+
TODO: Document `use`.
23+
24+
```javascript
25+
Reactotron.use((reactotron) => {
26+
// You get access to the reactotron instance so you can attach event listeners
27+
// so you can react to events coming through reactotron or event transmit your own events.
28+
})
29+
```
430

531
TODO: Document all the good things about .useReactNative here!
32+
```javascript
33+
Reactotron.useReactNative({
34+
// Global Error Tracking
35+
// errors: false, // Passing false turns off this plugin
36+
// errors: true, // Turn it on but don't care about the options
37+
errors: { // Turn it on with some options
38+
veto: (frame) => { return false; }
39+
},
40+
41+
// Open in editor
42+
editor: {
43+
url: 'http://localhost:8081' // URL to the react native metro bundler
44+
},
45+
46+
// React Native Overlay
47+
overlay: true, // No options, just true or false.
48+
49+
// React Native Async Storage
50+
asyncStorage: {
51+
ignore: ['keys', 'to', 'ignore'] // An array of async storage keys to not track
52+
},
53+
54+
// React Native Network Tracking
55+
networking: {
56+
ignoreContentTypes: /[a-z]/g, // Regex to ignore certain content types
57+
ignoreUrls: /[a-z]/g, // Regex to ignore certain urls
58+
},
59+
60+
// React Native storybook support
61+
storybook: true, // No options, just true or false.
62+
63+
// React Native dev tools support
64+
devTools: true, // No options, just true or false.
65+
})
66+
```

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
}
2424
</script>
2525
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
26+
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
2627
</body>
2728
</html>

0 commit comments

Comments
 (0)