yarn @welldone-software/why-did-you-render 5.0.0

latest releases: 8.0.3, 8.0.1, 8.0.0...
4 years ago

Notice:

  • Support for React@17 is on it's way.

Breaking changes:

  • No longer tracks deep equals results in useMemo.
    • Added tests to children re-rendered as a result of useMemo or useCallback results:
      • logs if the different result got generated because of deep equals deps changes
        image
      • ignores the prop change if deps were different
  • No longer tracks re-renders as a result of useCallback invalidation due to deps changes (fixes #46)
    • This fix was brought to you by the one and only @Hypnosphi :)
  • Made logOwnerReasons true by default
  • Only build a minimized UMD version now and won't commit the built files to git anymore
  • Removed babel-plugin-lodash because lodash optimizations better are done by the user of the library
  • Removed building in babel-plugin-transform-classes because we build with a newer babel where it is not needed anymore

Enhancements:

  • Added a feature where upon request you can get a detailed diff between props.
    For example for the following:
        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:
    image

Fixes

  • Only track hooks if they are supported

Readme

  • improved readme in general, including the installation tips

Dev

  • Added Travis pipelines that run lint, test, audit, and e2e tests for each PR.
  • Added a full e2e coverage using cypress that runs in the pipelines.
  • updated all dev packages

Don't miss a new why-did-you-render release

NewReleases is sending notifications on new releases.