How to use the react-inspector.ObjectInspector function in react-inspector

To help you get started, we’ve selected a few react-inspector examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rafaelrozon / react-storybook-console / dist / register.js View on Github external
var elements = consoleArgs.map(function (arg) {

                var key = createItemKey('log_item_ndx_');

                var item = void 0;

                if ((typeof arg === 'undefined' ? 'undefined' : (0, _typeof3.default)(arg)) === 'object') {

                    item = _react2.default.createElement(
                        'div',
                        { style: _styles2.default.inspector, key: key },
                        _react2.default.createElement(_reactInspector.ObjectInspector, { data: arg, showNonenumerable: true })
                    );
                } else {

                    item = _react2.default.createElement(
                        'span',
                        { style: _styles2.default.element, key: key },
                        arg
                    );
                }

                return item;
            });

react-inspector

Power of Browser DevTools inspectors right inside your React app

MIT
Latest version published 1 year ago

Package Health Score

77 / 100
Full package analysis