diff --git a/README.md b/README.md index 7ef0aa9..f521cf4 100644 --- a/README.md +++ b/README.md @@ -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 ; +} +``` + +## Credits + +Original solution by [Simon Buchan](https://stackoverflow.com/users/20135/simon-buchan) from [this comment](https://stackoverflow.com/a/50166137/6886817). + ## License MIT