fluxible-plugin-react-perf

1.0.0 • Public • Published

fluxible-plugin-react-perf

A fluxible plugin that runs the React.Perf tools on every executeAction and dispatch.

npm install fluxible-plugin-react-perf 

Note: This version requires React.js >0.14.0-rc1, to use React 0.13.x, install version 0.1.3 of this plugin.

Usage

Simply plug the Plugin into any app to have it print out the React.Perf results after any executeAction and dispatch call depending on the provided configuration options.

Since this functionality will typically not be used continuously the plugin can be disabled without leaving any overhead by providing options.enabled = false.

 
import ReactPerfPlugin from 'fluxible-plugin-react-perf';
 
fluxible.plug(ReactPerfPlugin({
  enabled: true,
  // Overwrite default options
));
 

Configuration Options and Defaults

Globally enable or disable:

  • enabled (false): Turn the plugin on or off in its entirety.

Enable/disable the various React.Perf outputs:

Print the duration of the actions and dispatches themselves:

  • printActionDuration (true): Print the time elapsed from a call to executeAction until its done method is called or Promise resolved.
  • printDispatchDuration (true): Print the time it takes to execute a dispatch from within an action creator.

Make the output even more verbose for further debugging:

  • verbose (true): Print a notice whenever an action or dispatch starts executing, useful when debugging to see where things fail.
  • printActionPayload (false): If verbose mode is enabled this will also print the payload provided to all executed actions.

License

This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.

Dependencies (1)

Dev Dependencies (6)

Package Sidebar

Install

npm i fluxible-plugin-react-perf

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marnusw