Skip to content

Commit

Permalink
Merge pull request #13020 from vitormateusalmeida/why-did-you-render
Browse files Browse the repository at this point in the history
Add why did you render lib
  • Loading branch information
pedrobmarin committed Aug 18, 2021
2 parents a6597c2 + e1e3c06 commit 138761c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bigbluebutton-html5/client/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*/
/* eslint no-unused-vars: 0 */

import './wdyr';

import React from 'react';
import { Meteor } from 'meteor/meteor';
import { render } from 'react-dom';
Expand Down
19 changes: 19 additions & 0 deletions bigbluebutton-html5/client/wdyr.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';

/*
To enable a detailed log of why a specific component is rendering,
execute this code in your browser's console:
require('/imports/ui/components/nav-bar/component.jsx').default.whyDidYouRender = {
logOnDifferentValues: true,
customName: 'Navbar',
}
*/

if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React, {
trackAllPureComponents: false,
});
}
8 changes: 8 additions & 0 deletions bigbluebutton-html5/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bigbluebutton-html5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@browser-bunyan/server-stream": "^1.6.1",
"@jitsi/sdp-interop": "0.1.14",
"@material-ui/core": "^4.11.4",
"@welldone-software/why-did-you-render": "^6.2.0",
"autoprefixer": "^10.2.5",
"axios": "^0.21.1",
"babel-runtime": "~6.26.0",
Expand Down

0 comments on commit 138761c

Please sign in to comment.