Update README.md

This commit is contained in:
2018-11-09 11:40:50 +01:00
committed by GitHub
parent 87bde4c742
commit 2b9a488184

View File

@@ -24,6 +24,7 @@ import {
DevToolModal, DevToolModal,
log, log,
network, network,
show,
} from 'react-native-debug-console'; } from 'react-native-debug-console';
network.attach(); network.attach();
@@ -56,3 +57,17 @@ const AppWithComponent = () => (
``` ```
Both `DevTool` and `DevToolModal` has a `includeStackTrace` property, which if set will print the stack trace on errors, not just the error message. `<DevTool includeStackTrace />` Both `DevTool` and `DevToolModal` has a `includeStackTrace` property, which if set will print the stack trace on errors, not just the error message. `<DevTool includeStackTrace />`
## Custom views
In addition to the included views (Console, Network and Storage), custom views can also be added using the `additionalTools` prop
```javascript
<DevToolModal
includeStackTrace
additionalTools={[{
name: 'Features',
view: <Features />,
getData: () => 'some data for export',
}]}
/>
```