Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperjohansson committed Apr 19, 2022
1 parent 3be6b8c commit 0a73e17
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ import { isDetox } from 'react-native-is-detox';
const result = await isDetox();
```

```js
import { isDetox } from 'react-native-is-detox';

function App() {
useEffect(() => {
isDetox().then((result) => {
if (result) {
console.log('Is Detox');
LogBox.ignoreAllLogs(true);
}
});
}, []);

return <MyApp />;
}
```

## Credits

Original solution by [Simon Buchan](https://stackoverflow.com/users/20135/simon-buchan) from [this comment](https://stackoverflow.com/a/50166137/6886817).

## License

MIT

0 comments on commit 0a73e17

Please sign in to comment.