why-did-you-render by Welldone Software monkey patches React to notify you about potentially avoidable re-renders. (Works with React Native as well.)
MIT License
Bot releases are visible (Hide)
React 18
since it differs quite a lot from previous versions when monkey patching. by @vzaidman
React.isWDYR
to React.__IS_WDYR__
by @vzaidmanuseSyncExternalStore
by @iamakulov in https://github.com/welldone-software/why-did-you-render/pull/283
yarn audit
vulnerabilities by @vzaidmanPublished by vzaidman 10 months ago
oops! please use v8.0.1 and above :)
Published by vzaidman over 2 years ago
Published by vzaidman almost 3 years ago
defaultProps
being lost on components patched by wdyr. Thank you @joeyparis!! https://github.com/welldone-software/why-did-you-render/pull/194
Now also tracks non-plain objects (like new User()
).
Thank you @barakyosi!!
PR: https://github.com/welldone-software/why-did-you-render/pull/179
CLOSED ISSUE: https://github.com/welldone-software/why-did-you-render/issues/74
Published by vzaidman almost 4 years ago
React@17
is on it's way.useMemo
or useCallback
results:
deps
changesdeps
were differentuseCallback
invalidation due to deps
changes (fixes #46)
logOwnerReasons
true by defaultbabel-plugin-lodash
because lodash optimizations better are done by the user of the librarybabel-plugin-transform-classes
because we build with a newer babel where it is not needed anymore const sameObj = {a: {b: 'c'}}
ReactDom.render(<Main containerProps={{style: {height: '100%'}, className: 'default-highchart', sameObj}} />, domElement)
ReactDom.render(<Main containerProps={{style: {height: '100%'}, className: 'default-highchart', sameObj}} />, domElement)
Since props are equal by value, you will see the following option that allows for the generation of a detailed diff report:lint
, test
, audit
, and e2e tests
for each PR.