1.0.5 • Published 5 years ago

@kevinwang0316/use-why-did-you-update v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

This is not working now. Please copy the source code to your own project folder to use it for now.

UseWhyDidYouUpdate React Hook

A React Hook to show why did your component was updated. This original code was written by Bruno Lemos and I found it from Gabe Ragland's useHooks.com. Please visit this amazing website to see more useful hooks.

Installing

npm install --save @kevinwang0316/use-why-did-you-update

Usage

import useWhyDidYouUpdate from '@kevinwang0316/use-why-did-you-update';

export const yourComponent = (props) => {
  useWhyDidYouUpdate('name you want', props);
  return <div></div>;
};

Parameters

useWhyDidYouUpdate(name, props, isDisableProduction);
parameterdefinitionrequiretypedefault value
nameA name will show when print the differenceyesString''
propsprops or stats you want to monitoryesObjectnull
isDisableProductionwhether disable the monitor under the productionnoBooleantrue

Result will show in the console

alt text

License

RedisHelper is licensed under MIT License - see the License file.

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago