fluxible-plugin-react-perf v1.0.0
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:
- printInclusive (
true): Enable/Disable printing the Perf.printInclusive measurements. - printExclusive (
false): Enable/Disable printing the Perf.printExclusive measurements. - printWasted (
true): Enable/Disable printing the Perf.printWasted measurements. - printDOM (
false): Enable/Disable printing the Perf.printDOM measurements.
Print the duration of the actions and dispatches themselves:
- printActionDuration (
true): Print the time elapsed from a call to executeAction until itsdonemethod is called orPromiseresolved. - printDispatchDuration (
true): Print the time it takes to execute adispatchfrom 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): Ifverbosemode 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.