Skip to content

Instantly share code, notes, and snippets.

@juddey
Created January 29, 2018 22:06
Show Gist options
  • Save juddey/ce7696695ae0d816adb12aff7c3d4fb0 to your computer and use it in GitHub Desktop.
Save juddey/ce7696695ae0d816adb12aff7c3d4fb0 to your computer and use it in GitHub Desktop.
Reactotron Shiz
if (__DEV__ && console.tron) {
// straight-up string logging
console.tron.log('Hello, I\'m an example of how to log via Reactotron.')
// logging an object for better clarity
console.tron.log({
message: 'pass objects for better logging',
someGeneratorFunction: selectAvatar
})
// fully customized!
const subObject = { a: 1, b: [1, 2, 3], c: true }
subObject.circularDependency = subObject // osnap!
console.tron.display({
name: '🔥 IGNITE 🔥',
preview: 'You should totally expand this',
value: {
'💃': 'Welcome to the future!',
subObject,
someInlineFunction: () => true,
someGeneratorFunction: startup,
someNormalFunction: selectAvatar
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment