diff --git a/src/photos/targets/browser/index.jsx b/src/photos/targets/browser/index.jsx index 841fabaf..90013ff8 100755 --- a/src/photos/targets/browser/index.jsx +++ b/src/photos/targets/browser/index.jsx @@ -7,6 +7,10 @@ import 'cozy-sharing/dist/stylesheet.css' import 'cozy-viewer/dist/stylesheet.css' import 'photos/styles/main.styl' +// Uncomment to activate why-did-you-render +// https://github.com/welldone-software/why-did-you-render +// import './wdyr' + import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' diff --git a/src/photos/targets/browser/wdyr.js b/src/photos/targets/browser/wdyr.js new file mode 100644 index 00000000..9c364d54 --- /dev/null +++ b/src/photos/targets/browser/wdyr.js @@ -0,0 +1,8 @@ +import React from 'react' + +if (process.env.NODE_ENV === 'development') { + const whyDidYouRender = require('@welldone-software/why-did-you-render') + whyDidYouRender(React, { + trackAllPureComponents: true + }) +}