react-debug
Debug module for react classes. Calls debug
under the hood with the namespace
set based on the displayName
property of your class.
Installation
npm install react-debug
Usage
var debug = ;var react = ; react; { return foo: 'bar' bin: 'baz' } { ; // => class:myClass render [object]}
Debug
To enable react-debug
in the browser type in the console:
localStoragedebug = '*';
API
debug([ctx], msg)
Pass in a context to retrieve the displayName
property from the react class.
If no context is provided we default to just using class
.
;// => class:baz foobar ;// => class barbar