react-transform-debug-inspector
React inspector tranformation function for babel-plugin-react-transform
(this feels like more of a demo than a real thing for now, but anyway)
Install
$ npm i -D react-transform-debug-inspector
Update your .babelrc
:
"plugins": , "extra":
If you need advanced settings, add path to config module:
"extra":
Config example:
// import styles for json tree; ; { // instead of plain object or literal, you can pass any component - like redux DevTools if componentcontextstore return <DevTools store=componentcontextstore monitor=LogMonitor /> ; } let _enabled = false; // add your custom panels ('props', 'state', 'context' by default) ... componentcontextstore ? name: 'redux' data: : ...defaultPanels // enable or disable inspector with key binding or whatever { window; // another example: enable(location.search.indexOf('debug') !== -1) ; } // filter components that don't need inspector true