react-log-updates

Log the number of updates occurring, broken down by components.

Usage no npm install needed!

<script type="module">
  import reactLogUpdates from 'https://cdn.skypack.dev/react-log-updates';
</script>

README

React Log Updates

Log the number of updates occurring, broken down by components.

Note: you'll have to attach React's DevTools before being able to see any logs.

Install

npm install --save react-log-updates

Usage

import logUpdates from 'react-log-updates';

logUpdates ({
  enabled: IS_DEVELOPMENT
  // collapsed: false // Don't collapse the console group
  // include: /Foo|Bar/i // Filter out if the name of the component doesn't match this regex
  // exclude: /Baz/i // Filter out if the name of the component matches this regex
});

Demo

Example Output

Related

License

MIT © Fabio Spampinato