Reactotron: console.log

Created on 26 Feb 2017  路  3Comments  路  Source: infinitered/reactotron

Just a question as per the example given in tips and tricks section.
Can we instead do like this itself?

console = Reactotron
console.log('hello rendering world', true)

INSTEAD of mentioned:
console.tron = Reactotron
console.tron.log('Sweet Freedom!')

Basically hijacking the whole console output wherever i was already using it without having to add extra word?
It works, but would it cause any issues of whatsoever or would be ok to use?
I understand that doing so i can not leverage great features which comes as part of parameters to use unless i add parameters, but this helps me to get going faster.

Most helpful comment

Great. @skellock thank you so much for great app. finally can get rid of chrome debug.

All 3 comments

Related https://github.com/infinitered/reactotron/issues/298

Basically the interface for Reactotron.log does not match that of console.log. @skellock comment in that ticket actually works pretty well (I am doing it in a project of mine.

Might be worth creating a plugin for this?

As long as we swizzle the original (intercept theirs, call ours, then call theirs), I don't see too much wrong going on.

This is something I'd consider adding into core in 2.0 though if it works well!

Great. @skellock thank you so much for great app. finally can get rid of chrome debug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

microcipu picture microcipu  路  5Comments

Eyesonly88 picture Eyesonly88  路  4Comments

andrewvy picture andrewvy  路  4Comments

davidjb picture davidjb  路  5Comments

skellock picture skellock  路  4Comments