wdyr-flipper-reporter
v0.0.2
Published
It's a Flipper plugin to report why-did-you-render results to Flipper Desktop app.
Downloads
13
Maintainers
Readme
wdyr-flipper-reporter
Installation
you need to install wdyr-flipper first
and then
npm install --save-dev wdyr-flipper-reporter
or
yarn add --dev wdyr-flipper-reporter
or
pnpm add --save-dev wdyr-flipper-reporter
Usage
in your wdyr.js
config file
if (__DEV__) {
const whyDidYouRender = require("@welldone-software/why-did-you-render");
const defaultNotifier = whyDidYouRender.defaultNotifier;
const wdyrStore = whyDidYouRender.wdyrStore;
const wdyrFlipper =
require("wdyr-flipper-reporter").setupDefaultFlipperReporter(wdyrStore);
whyDidYouRender(React, {
...options,
notifier: (updateInfo) => {
// if you want to see more details, please use the defaultNotifier
// defaultNotifier(updateInfo)
wdyrFlipper.addUpdateInfo(updateInfo);
},
});
}