-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] ability to add to all components? #32
Comments
what would you like to use to decide if a component should be tracked? https://github.com/welldone-software/why-did-you-render/blob/master/src/shouldTrack.js here is the file that makes this decision |
Thanks for the quick reply. I suppose I'm suggesting something along these lines: return !!(
options.includeAll ||
Component.whyDidYouRender ||
shouldInclude(displayName, options)
) |
try what do you say? |
works like a charm, thanks. Closing |
so why not provide a option? const whyDidYouRender = require('@welldone-software/why-did-you-render')
whyDidYouRender.isTrackAllPureComponent = true //default can be false
whyDidYouRender(React) |
i don't want people to track all components. it's not a best practice. |
i dont very familiar about react |
that's a good idea. ill consider it |
implement SCU? |
scu: shouldComponentUpdate |
ok ill add this configuration. thanks for the idea |
First, thanks for such an amazing tool with hooks support. Incredibly helpful.
We have over 100 components in our project, and it will take a long time to manually add
Component.whyDidYouRender = true;
in every single file.Is there a way to attach to everything? I see the
[include]
option, but we are currently not usingDisplayName
- so we would still have to touch every file.Thanks for the help.
The text was updated successfully, but these errors were encountered: